25 #ifndef SFML_SOUNDSTREAM_HPP
26 #define SFML_SOUNDSTREAM_HPP
31 #include <SFML/Audio/Export.hpp>
32 #include <SFML/Audio/SoundSource.hpp>
33 #include <SFML/System/Thread.hpp>
34 #include <SFML/System/Time.hpp>
35 #include <SFML/System/Mutex.hpp>
110 unsigned int getChannelCount()
const;
121 unsigned int getSampleRate()
const;
144 void setPlayingOffset(
Time timeOffset);
154 Time getPlayingOffset()
const;
169 void setLoop(
bool loop);
179 bool getLoop()
const;
205 void initialize(
unsigned int channelCount,
unsigned int sampleRate);
224 virtual bool onGetData(
Chunk& data) = 0;
235 virtual void onSeek(
Time timeOffset) = 0;
261 bool fillAndPushBuffer(
unsigned int bufferNum);
291 mutable Mutex m_threadMutex;
292 Status m_threadStartState;
294 unsigned int m_buffers[BufferCount];
295 unsigned int m_channelCount;
296 unsigned int m_sampleRate;
299 Uint64 m_samplesProcessed;
300 bool m_endBuffers[BufferCount];
306 #endif // SFML_SOUNDSTREAM_HPP
Utility class to manipulate threads.
const Int16 * samples
Pointer to the audio samples.
Abstract base class for streamed audio sources.
Structure defining a chunk of audio data to stream.
Blocks concurrent access to shared resources from multiple threads.
Status
Enumeration of the sound source states.
Base class defining a sound's properties.
std::size_t sampleCount
Number of samples pointed by Samples.