25 #ifndef SFML_SOUNDSTREAM_H 26 #define SFML_SOUNDSTREAM_H 31 #include <SFML/Audio/Export.h> 32 #include <SFML/Audio/SoundStatus.h> 33 #include <SFML/Audio/Types.h> 34 #include <SFML/System/Time.h> 35 #include <SFML/System/Vector3.h> 49 typedef void (*sfSoundStreamSeekCallback)(
sfTime,
void*);
64 CSFML_AUDIO_API sfSoundStream* sfSoundStream_create(sfSoundStreamGetDataCallback onGetData,
65 sfSoundStreamSeekCallback onSeek,
66 unsigned int channelCount,
67 unsigned int sampleRate,
76 CSFML_AUDIO_API
void sfSoundStream_destroy(sfSoundStream* soundStream);
90 CSFML_AUDIO_API
void sfSoundStream_play(sfSoundStream* soundStream);
101 CSFML_AUDIO_API
void sfSoundStream_pause(sfSoundStream* soundStream);
113 CSFML_AUDIO_API
void sfSoundStream_stop(sfSoundStream* soundStream);
123 CSFML_AUDIO_API sfSoundStatus sfSoundStream_getStatus(
const sfSoundStream* soundStream);
135 CSFML_AUDIO_API
unsigned int sfSoundStream_getChannelCount(
const sfSoundStream* soundStream);
148 CSFML_AUDIO_API
unsigned int sfSoundStream_getSampleRate(
const sfSoundStream* soundStream);
163 CSFML_AUDIO_API
void sfSoundStream_setPitch(sfSoundStream* soundStream,
float pitch);
175 CSFML_AUDIO_API
void sfSoundStream_setVolume(sfSoundStream* soundStream,
float volume);
188 CSFML_AUDIO_API
void sfSoundStream_setPosition(sfSoundStream* soundStream,
sfVector3f position);
203 CSFML_AUDIO_API
void sfSoundStream_setRelativeToListener(sfSoundStream* soundStream, sfBool relative);
219 CSFML_AUDIO_API
void sfSoundStream_setMinDistance(sfSoundStream* soundStream,
float distance);
237 CSFML_AUDIO_API
void sfSoundStream_setAttenuation(sfSoundStream* soundStream,
float attenuation);
249 CSFML_AUDIO_API
void sfSoundStream_setPlayingOffset(sfSoundStream* soundStream,
sfTime timeOffset);
263 CSFML_AUDIO_API
void sfSoundStream_setLoop(sfSoundStream* soundStream, sfBool loop);
273 CSFML_AUDIO_API
float sfSoundStream_getPitch(
const sfSoundStream* soundStream);
283 CSFML_AUDIO_API
float sfSoundStream_getVolume(
const sfSoundStream* soundStream);
293 CSFML_AUDIO_API
sfVector3f sfSoundStream_getPosition(
const sfSoundStream* soundStream);
304 CSFML_AUDIO_API sfBool sfSoundStream_isRelativeToListener(
const sfSoundStream* soundStream);
314 CSFML_AUDIO_API
float sfSoundStream_getMinDistance(
const sfSoundStream* soundStream);
324 CSFML_AUDIO_API
float sfSoundStream_getAttenuation(
const sfSoundStream* soundStream);
334 CSFML_AUDIO_API sfBool sfSoundStream_getLoop(
const sfSoundStream* soundStream);
344 CSFML_AUDIO_API
sfTime sfSoundStream_getPlayingOffset(
const sfSoundStream* soundStream);
347 #endif // SFML_SOUNDSTREAM_H defines the data to fill by the OnGetData callback
3-component vector of floats
sfInt16 * samples
Pointer to the audio samples.
unsigned int sampleCount
Number of samples pointed by Samples.