summaryrefslogtreecommitdiffstats
path: root/src/audio_core/stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/stream.h')
-rw-r--r--src/audio_core/stream.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/audio_core/stream.h b/src/audio_core/stream.h
index 049b92ca9..aebfeb51d 100644
--- a/src/audio_core/stream.h
+++ b/src/audio_core/stream.h
@@ -11,13 +11,16 @@
#include <queue>
#include "audio_core/buffer.h"
-#include "audio_core/sink_stream.h"
-#include "common/assert.h"
#include "common/common_types.h"
-#include "core/core_timing.h"
+
+namespace CoreTiming {
+struct EventType;
+}
namespace AudioCore {
+class SinkStream;
+
/**
* Represents an audio stream, which is a sequence of queued buffers, to be outputed by AudioOut
*/
@@ -30,6 +33,12 @@ public:
Multi51Channel16,
};
+ /// Current state of the stream
+ enum class State {
+ Stopped,
+ Playing,
+ };
+
/// Callback function type, used to change guest state on a buffer being released
using ReleaseCallback = std::function<void()>;
@@ -49,7 +58,7 @@ public:
bool ContainsBuffer(Buffer::Tag tag) const;
/// Returns a vector of recently released buffers specified by tag
- std::vector<Buffer::Tag> GetTagsAndReleaseBuffers(size_t max_count);
+ std::vector<Buffer::Tag> GetTagsAndReleaseBuffers(std::size_t max_count);
/// Returns true if the stream is currently playing
bool IsPlaying() const {
@@ -57,7 +66,7 @@ public:
}
/// Returns the number of queued buffers
- size_t GetQueueSize() const {
+ std::size_t GetQueueSize() const {
return queued_buffers.size();
}
@@ -69,13 +78,10 @@ public:
/// Gets the number of channels
u32 GetNumChannels() const;
-private:
- /// Current state of the stream
- enum class State {
- Stopped,
- Playing,
- };
+ /// Get the state
+ State GetState() const;
+private:
/// Plays the next queued buffer in the audio stream, starting playback if necessary
void PlayNextBuffer();