25 #ifndef SFML_SOUNDSTREAM_HPP 26 #define SFML_SOUNDSTREAM_HPP 31 #include <SFML/Audio/Sound.hpp> 32 #include <SFML/System/Thread.hpp> 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];
228 #endif // SFML_SOUNDSTREAM_HPP void SetPitch(float Pitch)
Set the sound pitch.
void SetRelativeToListener(bool Relative)
Make the sound's position relative to the listener's position, or absolute.
void SetPosition(float X, float Y, float Z)
Set the sound position (take 3 values).
Sound defines the properties of a sound such as position, volume, pitch, etc.
void SetAttenuation(float Attenuation)
Set the attenuation factor - the higher the attenuation, the more the sound will be attenuated with d...
Thread defines an easy way to manipulate a thread.
const Int16 * Samples
Pointer to the audio samples.
float GetAttenuation() const
Get the attenuation factor.
Vector3f GetPosition() const
Get the sound position.
float GetVolume() const
Get the volume.
void Pause()
Pause the sound.
SoundStream is a streamed sound, ie samples are acquired while the sound is playing.
float GetPitch() const
Get the pitch.
Structure defining a chunk of audio data to stream.
void SetVolume(float Volume)
Set the sound volume.
std::size_t NbSamples
Number of samples pointed by Samples.
Status
Enumeration of the sound states.
float GetMinDistance() const
Get the minimum distance.
void SetMinDistance(float MinDistance)
Set the minimum distance - closer than this distance, the listener will hear the sound at its maximum...
bool IsRelativeToListener() const
Tell if the sound's position is relative to the listener's position, or if it's absolute.