25#ifndef SFML_SOUNDSTREAM_HPP
26#define SFML_SOUNDSTREAM_HPP
31#include <SFML/Audio/Sound.hpp>
32#include <SFML/System/Thread.hpp>
53 using Sound::SetPitch;
54 using Sound::SetVolume;
55 using Sound::SetPosition;
56 using Sound::SetRelativeToListener;
57 using Sound::SetMinDistance;
58 using Sound::SetAttenuation;
59 using Sound::GetPitch;
60 using Sound::GetVolume;
61 using Sound::GetPosition;
62 using Sound::IsRelativeToListener;
63 using Sound::GetMinDistance;
64 using Sound::GetAttenuation;
99 unsigned int GetChannelsCount()
const;
107 unsigned int GetSampleRate()
const;
123 float GetPlayingOffset()
const;
132 void SetLoop(
bool Loop);
140 bool GetLoop()
const;
157 void Initialize(
unsigned int ChannelsCount,
unsigned int SampleRate);
173 virtual bool OnStart();
183 virtual bool OnGetData(
Chunk& Data) = 0;
194 bool FillAndPushBuffer(
unsigned int BufferNum);
210 enum {BuffersCount = 3};
216 unsigned int myBuffers[BuffersCount];
217 unsigned int myChannelsCount;
218 unsigned int mySampleRate;
219 unsigned long myFormat;
221 unsigned int mySamplesProcessed;
222 bool myEndBuffers[BuffersCount];
SoundStream is a streamed sound, ie samples are acquired while the sound is playing.
Status
Enumeration of the sound states.
Sound defines the properties of a sound such as position, volume, pitch, etc.
Status
Enumeration of the sound states.
Thread defines an easy way to manipulate a thread.
Structure defining a chunk of audio data to stream.
std::size_t NbSamples
Number of samples pointed by Samples.
const Int16 * Samples
Pointer to the audio samples.