#include <SFML/Config.h>#include <SFML/Audio/SoundStatus.h>#include <SFML/Audio/Types.h>Go to the source code of this file.
Data Structures | |
| struct | sfSoundStreamChunk |
| sfSoundStreamChunk defines the data to fill by the OnGetData callback More... | |
Typedefs | |
| typedef sfBool(* | sfSoundStreamStartCallback )(void *) |
| Type of the callback used to start a sound stream. | |
| typedef sfBool(* | sfSoundStreamGetDataCallback )(sfSoundStreamChunk *, void *) |
| Type of the callback used to get a sound stream data. | |
Functions | |
| CSFML_API sfSoundStream * | sfSoundStream_Create (sfSoundStreamStartCallback OnStart, sfSoundStreamGetDataCallback OnGetData, unsigned int ChannelsCount, unsigned int SampleRate, void *UserData) |
| Construct a new sound stream. | |
| CSFML_API void | sfSoundStream_Destroy (sfSoundStream *SoundStreamStream) |
| Destroy an existing sound stream. | |
| CSFML_API void | sfSoundStream_Play (sfSoundStream *SoundStream) |
| Start playing a sound stream. | |
| CSFML_API void | sfSoundStream_Pause (sfSoundStream *SoundStream) |
| Pause a sound stream. | |
| CSFML_API void | sfSoundStream_Stop (sfSoundStream *SoundStream) |
| Stop playing a sound stream. | |
| CSFML_API sfSoundStatus | sfSoundStream_GetStatus (sfSoundStream *SoundStream) |
| Get the status of a sound stream (stopped, paused, playing). | |
| CSFML_API unsigned int | sfSoundStream_GetChannelsCount (sfSoundStream *SoundStream) |
| Return the number of channels of a sound stream (1 = mono, 2 = stereo). | |
| CSFML_API unsigned int | sfSoundStream_GetSampleRate (sfSoundStream *SoundStream) |
| Get the sample rate of a sound stream. | |
| CSFML_API void | sfSoundStream_SetPitch (sfSoundStream *SoundStream, float Pitch) |
| Set the pitch of a sound stream. | |
| CSFML_API void | sfSoundStream_SetVolume (sfSoundStream *SoundStream, float Volume) |
| Set the volume of a sound stream. | |
| CSFML_API void | sfSoundStream_SetPosition (sfSoundStream *SoundStream, float X, float Y, float Z) |
| Set the position of a sound stream. | |
| CSFML_API void | sfSoundStream_SetRelativeToListener (sfSoundStream *SoundStream, sfBool Relative) |
| Make the sound stream's position relative to the listener's position, or absolute. | |
| CSFML_API void | sfSoundStream_SetMinDistance (sfSoundStream *SoundStream, float MinDistance) |
| Set the minimum distance - closer than this distance, the listener will hear the sound stream at its maximum volume. | |
| CSFML_API void | sfSoundStream_SetAttenuation (sfSoundStream *SoundStream, float Attenuation) |
| Set the attenuation factor - the higher the attenuation, the more the sound stream will be attenuated with distance from listener. | |
| CSFML_API void | sfSoundStream_SetLoop (sfSoundStream *SoundStream, sfBool Loop) |
| Set a stream loop state. | |
| CSFML_API float | sfSoundStream_GetPitch (sfSoundStream *SoundStream) |
| Get the pitch of a sound stream. | |
| CSFML_API float | sfSoundStream_GetVolume (sfSoundStream *SoundStream) |
| Get the volume of a sound stream. | |
| CSFML_API void | sfSoundStream_GetPosition (sfSoundStream *SoundStream, float *X, float *Y, float *Z) |
| Get the position of a sound stream. | |
| CSFML_API sfBool | sfSoundStream_IsRelativeToListener (sfSoundStream *SoundStream) |
| Tell if the sound stream's position is relative to the listener's position, or if it's absolute. | |
| CSFML_API float | sfSoundStream_GetMinDistance (sfSoundStream *SoundStream) |
| Get the minimum distance of a sound stream. | |
| CSFML_API float | sfSoundStream_GetAttenuation (sfSoundStream *SoundStream) |
| Get the attenuation factor of a sound stream. | |
| CSFML_API sfBool | sfSoundStream_GetLoop (sfSoundStream *SoundStream) |
| Tell whether or not a stream is looping. | |
| CSFML_API float | sfSoundStream_GetPlayingOffset (sfSoundStream *SoundStream) |
| Get the current playing position of a sound stream. | |
| typedef sfBool(* sfSoundStreamGetDataCallback)(sfSoundStreamChunk *, void *) |
| typedef sfBool(* sfSoundStreamStartCallback)(void *) |
| CSFML_API sfSoundStream* sfSoundStream_Create | ( | sfSoundStreamStartCallback | OnStart, | |
| sfSoundStreamGetDataCallback | OnGetData, | |||
| unsigned int | ChannelsCount, | |||
| unsigned int | SampleRate, | |||
| void * | UserData | |||
| ) |
Construct a new sound stream.
| OnStart | : Function called when the stream starts (can be NULL) | |
| OnGetData | : Function called when the stream needs more data (can't be NULL) | |
| ChannelsCount | : Number of channels to use (1 = mono, 2 = stereo) | |
| SampleRate | : Sample rate of the sound (44100 = CD quality) | |
| UserData | : Data to pass to the callback functions |
| CSFML_API void sfSoundStream_Destroy | ( | sfSoundStream * | SoundStreamStream | ) |
Destroy an existing sound stream.
| SoundStream | : Sound stream to delete |
| CSFML_API float sfSoundStream_GetAttenuation | ( | sfSoundStream * | SoundStream | ) |
Get the attenuation factor of a sound stream.
| SoundStream | : Sound stream to get the attenuation factor from |
| CSFML_API unsigned int sfSoundStream_GetChannelsCount | ( | sfSoundStream * | SoundStream | ) |
Return the number of channels of a sound stream (1 = mono, 2 = stereo).
| SoundStream | : Sound stream to get the channels count from |
| CSFML_API sfBool sfSoundStream_GetLoop | ( | sfSoundStream * | SoundStream | ) |
Tell whether or not a stream is looping.
| SoundStream | : Soundstream to get the loop state from |
| CSFML_API float sfSoundStream_GetMinDistance | ( | sfSoundStream * | SoundStream | ) |
Get the minimum distance of a sound stream.
| SoundStream | : Sound stream to get the minimum distance from |
| CSFML_API float sfSoundStream_GetPitch | ( | sfSoundStream * | SoundStream | ) |
Get the pitch of a sound stream.
| SoundStream | : Sound stream to get the pitch from |
| CSFML_API float sfSoundStream_GetPlayingOffset | ( | sfSoundStream * | SoundStream | ) |
Get the current playing position of a sound stream.
| SoundStream | : Sound stream to get the position from |
| CSFML_API void sfSoundStream_GetPosition | ( | sfSoundStream * | SoundStream, | |
| float * | X, | |||
| float * | Y, | |||
| float * | Z | |||
| ) |
Get the position of a sound stream.
| SoundStream | : Sound stream to get the position from | |
| X | : X position of the sound stream in the world | |
| Y | : Y position of the sound stream in the world | |
| Z | : Z position of the sound stream in the world |
| CSFML_API unsigned int sfSoundStream_GetSampleRate | ( | sfSoundStream * | SoundStream | ) |
Get the sample rate of a sound stream.
| SoundStream | : Sound stream to get the sample rate from |
| CSFML_API sfSoundStatus sfSoundStream_GetStatus | ( | sfSoundStream * | SoundStream | ) |
Get the status of a sound stream (stopped, paused, playing).
| SoundStream | : Sound stream to get the status from |
| CSFML_API float sfSoundStream_GetVolume | ( | sfSoundStream * | SoundStream | ) |
Get the volume of a sound stream.
| SoundStream | : Sound stream to get the volume from |
| CSFML_API sfBool sfSoundStream_IsRelativeToListener | ( | sfSoundStream * | SoundStream | ) |
Tell if the sound stream's position is relative to the listener's position, or if it's absolute.
| SoundStream | : Sound stream to check |
| CSFML_API void sfSoundStream_Pause | ( | sfSoundStream * | SoundStream | ) |
Pause a sound stream.
| SoundStream | : Sound stream to pause |
| CSFML_API void sfSoundStream_Play | ( | sfSoundStream * | SoundStream | ) |
Start playing a sound stream.
| SoundStream | : Sound stream to play |
| CSFML_API void sfSoundStream_SetAttenuation | ( | sfSoundStream * | SoundStream, | |
| float | Attenuation | |||
| ) |
Set the attenuation factor - the higher the attenuation, the more the sound stream will be attenuated with distance from listener.
The default attenuation factor 1.0
| SoundStream | : Sound stream to modify | |
| Attenuation | : New attenuation factor for the sound stream |
| CSFML_API void sfSoundStream_SetLoop | ( | sfSoundStream * | SoundStream, | |
| sfBool | Loop | |||
| ) |
Set a stream loop state.
| SoundStream | : Stream to set the loop state | |
| Loop | : sfTrue to play in loop, sfFalse to play once |
| CSFML_API void sfSoundStream_SetMinDistance | ( | sfSoundStream * | SoundStream, | |
| float | MinDistance | |||
| ) |
Set the minimum distance - closer than this distance, the listener will hear the sound stream at its maximum volume.
The default minimum distance is 1.0
| SoundStream | : Sound stream to modify | |
| MinDistance | : New minimum distance for the sound stream |
| CSFML_API void sfSoundStream_SetPitch | ( | sfSoundStream * | SoundStream, | |
| float | Pitch | |||
| ) |
Set the pitch of a sound stream.
| SoundStream | : Sound stream to modify | |
| Pitch | : New pitch |
| CSFML_API void sfSoundStream_SetPosition | ( | sfSoundStream * | SoundStream, | |
| float | X, | |||
| float | Y, | |||
| float | Z | |||
| ) |
Set the position of a sound stream.
| SoundStream | : Sound stream to modify | |
| X | : X position of the sound stream in the world | |
| Y | : Y position of the sound stream in the world | |
| Z | : Z position of the sound stream in the world |
| CSFML_API void sfSoundStream_SetRelativeToListener | ( | sfSoundStream * | SoundStream, | |
| sfBool | Relative | |||
| ) |
Make the sound stream's position relative to the listener's position, or absolute.
The default value is false (absolute)
| SoundStream | : Sound stream to modify | |
| Relative | : True to set the position relative, false to set it absolute |
| CSFML_API void sfSoundStream_SetVolume | ( | sfSoundStream * | SoundStream, | |
| float | Volume | |||
| ) |
Set the volume of a sound stream.
| SoundStream | : Sound stream to modify | |
| Volume | : Volume (in range [0, 100]) |
| CSFML_API void sfSoundStream_Stop | ( | sfSoundStream * | SoundStream | ) |
Stop playing a sound stream.
| SoundStream | : Sound stream to stop |