Changed internal naming convention (local variables now start with a lower case character)
Removed the AudioResource class git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1166 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
7cc00085d8
commit
45b150648d
245 changed files with 7865 additions and 8065 deletions
|
@ -34,10 +34,10 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
/// Change the global volume of all the sounds
|
||||
///
|
||||
/// \param Volume : New global volume, in the range [0, 100]
|
||||
/// \param volume : New global volume, in the range [0, 100]
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_SetGlobalVolume(float Volume);
|
||||
CSFML_API void sfListener_SetGlobalVolume(float volume);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current value of the global volume of all the sounds
|
||||
|
@ -50,44 +50,44 @@ CSFML_API float sfListener_GetGlobalVolume();
|
|||
////////////////////////////////////////////////////////////
|
||||
/// Change the position of the listener
|
||||
///
|
||||
/// \param PosX : X position of the listener in the world
|
||||
/// \param PosY : Y position of the listener in the world
|
||||
/// \param PosZ : Z position of the listener in the world
|
||||
/// \param x : X position of the listener in the world
|
||||
/// \param y : Y position of the listener in the world
|
||||
/// \param z : Z position of the listener in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_SetPosition(float PosX, float PosY, float PosZ);
|
||||
CSFML_API void sfListener_SetPosition(float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current position of the listener
|
||||
///
|
||||
/// \param PosX : X position of the listener in the world
|
||||
/// \param PosY : Y position of the listener in the world
|
||||
/// \param PosZ : Z position of the listener in the world
|
||||
/// \param x : X position of the listener in the world
|
||||
/// \param y : Y position of the listener in the world
|
||||
/// \param z : Z position of the listener in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_GetPosition(float* PosX, float* PosY, float* PosZ);
|
||||
CSFML_API void sfListener_GetPosition(float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Change the orientation of the listener (the point
|
||||
/// he must look at)
|
||||
///
|
||||
/// \param TargetX : X position of the point the listener must look at
|
||||
/// \param TargetY : X position of the point the listener must look at
|
||||
/// \param TargetZ : X position of the point the listener must look at
|
||||
/// \param x : X position of the point the listener must look at
|
||||
/// \param y : X position of the point the listener must look at
|
||||
/// \param z : X position of the point the listener must look at
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_SetTarget(float TargetX, float TargetY, float TargetZ);
|
||||
CSFML_API void sfListener_SetTarget(float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current orientation of the listener (the point
|
||||
/// he's looking at)
|
||||
///
|
||||
/// \param TargetX : X position of the point the listener is looking at
|
||||
/// \param TargetY : X position of the point the listener is looking at
|
||||
/// \param TargetZ : X position of the point the listener is looking at
|
||||
/// \param x : X position of the point the listener is looking at
|
||||
/// \param y : X position of the point the listener is looking at
|
||||
/// \param z : X position of the point the listener is looking at
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfListener_GetTarget(float* TargetX, float* TargetY, float* TargetZ);
|
||||
CSFML_API void sfListener_GetTarget(float* x, float* y, float* z);
|
||||
|
||||
|
||||
#endif // SFML_LISTENER_H
|
||||
|
|
|
@ -36,257 +36,257 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
/// Create a new music and load it from a file
|
||||
///
|
||||
/// \param Filename : Path of the music file to open
|
||||
/// \param filename : Path of the music file to open
|
||||
///
|
||||
/// \return A new sfMusic object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfMusic* sfMusic_CreateFromFile(const char* Filename);
|
||||
CSFML_API sfMusic* sfMusic_CreateFromFile(const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Create a new music and load it from a file in memory
|
||||
///
|
||||
/// \param Data : Pointer to the file data in memory
|
||||
/// \param SizeInBytes : Size of the data to load, in bytes
|
||||
/// \param data : Pointer to the file data in memory
|
||||
/// \param sizeInBytes : Size of the data to load, in bytes
|
||||
///
|
||||
/// \return A new sfMusic object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfMusic* sfMusic_CreateFromMemory(const char* Data, size_t SizeInBytes);
|
||||
CSFML_API sfMusic* sfMusic_CreateFromMemory(const char* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing music
|
||||
///
|
||||
/// \param Music : Music to delete
|
||||
/// \param music : Music to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_Destroy(sfMusic* Music);
|
||||
CSFML_API void sfMusic_Destroy(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set a music loop state
|
||||
///
|
||||
/// \param Music : Music to set the loop state
|
||||
/// \param Loop : sfTrue to play in loop, sfFalse to play once
|
||||
/// \param music : Music to set the loop state
|
||||
/// \param loop : sfTrue to play in loop, sfFalse to play once
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetLoop(sfMusic* Music, sfBool Loop);
|
||||
CSFML_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell whether or not a music is looping
|
||||
///
|
||||
/// \param Music : Music to get the loop state from
|
||||
/// \param music : Music to get the loop state from
|
||||
///
|
||||
/// \return sfTrue if the music is looping, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfMusic_GetLoop(sfMusic* Music);
|
||||
CSFML_API sfBool sfMusic_GetLoop(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get a music duration
|
||||
///
|
||||
/// \param Music : Music to get the duration from
|
||||
/// \param music : Music to get the duration from
|
||||
///
|
||||
/// \return Music duration, in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetDuration(sfMusic* Music);
|
||||
CSFML_API float sfMusic_GetDuration(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Start playing a music
|
||||
///
|
||||
/// \param Music : Music to play
|
||||
/// \param music : Music to play
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_Play(sfMusic* Music);
|
||||
CSFML_API void sfMusic_Play(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Pause a music
|
||||
///
|
||||
/// \param Music : Music to pause
|
||||
/// \param music : Music to pause
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_Pause(sfMusic* Music);
|
||||
CSFML_API void sfMusic_Pause(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Stop playing a music
|
||||
///
|
||||
/// \param Music : Music to stop
|
||||
/// \param music : Music to stop
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_Stop(sfMusic* Music);
|
||||
CSFML_API void sfMusic_Stop(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the number of channels of a music (1 = mono, 2 = stereo)
|
||||
///
|
||||
/// \param Music : Music to get the channels count from
|
||||
/// \param music : Music to get the channels count from
|
||||
///
|
||||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfMusic_GetChannelsCount(sfMusic* Music);
|
||||
CSFML_API unsigned int sfMusic_GetChannelsCount(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the stream sample rate of a music
|
||||
///
|
||||
/// \param Music : Music to get the sample rate from
|
||||
/// \param music : Music to get the sample rate from
|
||||
///
|
||||
/// \return Stream frequency (number of samples per second)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfMusic_GetSampleRate(sfMusic* Music);
|
||||
CSFML_API unsigned int sfMusic_GetSampleRate(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the status of a music (stopped, paused, playing)
|
||||
///
|
||||
/// \param Music : Music to get the status from
|
||||
/// \param music : Music to get the status from
|
||||
///
|
||||
/// \return Current status of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStatus sfMusic_GetStatus(sfMusic* Music);
|
||||
CSFML_API sfSoundStatus sfMusic_GetStatus(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current playing position of a music
|
||||
///
|
||||
/// \param Music : Music to get the position from
|
||||
/// \param music : Music to get the position from
|
||||
///
|
||||
/// \return Current playing position, expressed in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetPlayingOffset(sfMusic* Music);
|
||||
CSFML_API float sfMusic_GetPlayingOffset(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the pitch of a music
|
||||
///
|
||||
/// \param Music : Music to modify
|
||||
/// \param Pitch : New pitch
|
||||
/// \param music : Music to modify
|
||||
/// \param pitch : New pitch
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetPitch(sfMusic* Music, float Pitch);
|
||||
CSFML_API void sfMusic_SetPitch(sfMusic* music, float pitch);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the volume of a music
|
||||
///
|
||||
/// \param Music : Music to modify
|
||||
/// \param Volume : Volume (in range [0, 100])
|
||||
/// \param music : Music to modify
|
||||
/// \param volume : Volume (in range [0, 100])
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetVolume(sfMusic* Music, float Volume);
|
||||
CSFML_API void sfMusic_SetVolume(sfMusic* music, float volume);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the position of a music
|
||||
///
|
||||
/// \param Music : Music to modify
|
||||
/// \param X : X position of the sound in the world
|
||||
/// \param Y : Y position of the sound in the world
|
||||
/// \param Z : Z position of the sound in the world
|
||||
/// \param music : Music to modify
|
||||
/// \param x : X position of the sound in the world
|
||||
/// \param y : Y position of the sound in the world
|
||||
/// \param z : Z position of the sound in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetPosition(sfMusic* Music, float X, float Y, float Z);
|
||||
CSFML_API void sfMusic_SetPosition(sfMusic* music, float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Make the music's position relative to the listener's
|
||||
/// position, or absolute.
|
||||
/// The default value is false (absolute)
|
||||
///
|
||||
/// \param Music : Music to modify
|
||||
/// \param Relative : True to set the position relative, false to set it absolute
|
||||
/// \param music : Music to modify
|
||||
/// \param relative : True to set the position relative, false to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetRelativeToListener(sfMusic* Music, sfBool Relative);
|
||||
CSFML_API void sfMusic_SetRelativeToListener(sfMusic* music, sfBool relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the minimum distance - closer than this distance,
|
||||
/// the listener will hear the music at its maximum volume.
|
||||
/// The default minimum distance is 1.0
|
||||
///
|
||||
/// \param Music : Music to modify
|
||||
/// \param MinDistance : New minimum distance for the music
|
||||
/// \param music : Music to modify
|
||||
/// \param distance : New minimum distance for the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetMinDistance(sfMusic* Music, float MinDistance);
|
||||
CSFML_API void sfMusic_SetMinDistance(sfMusic* music, float distance);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the attenuation factor - the higher the attenuation, the
|
||||
/// more the sound will be attenuated with distance from listener.
|
||||
/// The default attenuation factor 1.0
|
||||
///
|
||||
/// \param Music : Music to modify
|
||||
/// \param Attenuation : New attenuation factor for the sound
|
||||
/// \param music : Music to modify
|
||||
/// \param attenuation : New attenuation factor for the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetAttenuation(sfMusic* Music, float Attenuation);
|
||||
CSFML_API void sfMusic_SetAttenuation(sfMusic* music, float attenuation);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the current playing position of a music
|
||||
///
|
||||
/// \param Music : Music to modify
|
||||
/// \param TimeOffset : New playing position, expressed in seconds
|
||||
/// \param music : Music to modify
|
||||
/// \param timeOffset : New playing position, expressed in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_SetPlayingOffset(sfMusic* Music, float TimeOffset);
|
||||
CSFML_API void sfMusic_SetPlayingOffset(sfMusic* music, float timeOffset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the pitch of a music
|
||||
///
|
||||
/// \param Music : Music to get the pitch from
|
||||
/// \param music : Music to get the pitch from
|
||||
///
|
||||
/// \return Pitch value
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetPitch(sfMusic* Music);
|
||||
CSFML_API float sfMusic_GetPitch(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the volume of a music
|
||||
///
|
||||
/// \param Music : Music to get the volume from
|
||||
/// \param music : Music to get the volume from
|
||||
///
|
||||
/// \return Volume value (in range [1, 100])
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetVolume(sfMusic* Music);
|
||||
CSFML_API float sfMusic_GetVolume(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the position of a music
|
||||
///
|
||||
/// \param Music : Music to get the position from
|
||||
/// \param X : X position of the sound in the world
|
||||
/// \param Y : Y position of the sound in the world
|
||||
/// \param Z : Z position of the sound in the world
|
||||
/// \param music : Music to get the position from
|
||||
/// \param x : X position of the sound in the world
|
||||
/// \param y : Y position of the sound in the world
|
||||
/// \param z : Z position of the sound in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_GetPosition(sfMusic* Music, float* X, float* Y, float* Z);
|
||||
CSFML_API void sfMusic_GetPosition(sfMusic* music, float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the music's position is relative to the listener's
|
||||
/// position, or if it's absolute
|
||||
///
|
||||
/// \param Music : Music to check
|
||||
/// \param music : Music to check
|
||||
///
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfMusic_IsRelativeToListener(sfMusic* Music);
|
||||
CSFML_API sfBool sfMusic_IsRelativeToListener(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a music
|
||||
///
|
||||
/// \param Music : Music to get the minimum distance from
|
||||
/// \param music : Music to get the minimum distance from
|
||||
///
|
||||
/// \return Minimum distance for the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetMinDistance(sfMusic* Music);
|
||||
CSFML_API float sfMusic_GetMinDistance(sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the attenuation factor of a music
|
||||
///
|
||||
/// \param Music : Music to get the attenuation factor from
|
||||
/// \param music : Music to get the attenuation factor from
|
||||
///
|
||||
/// \return Attenuation factor for the a music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetAttenuation(sfMusic* Music);
|
||||
CSFML_API float sfMusic_GetAttenuation(sfMusic* music);
|
||||
|
||||
|
||||
#endif // SFML_MUSIC_H
|
||||
|
|
|
@ -44,225 +44,225 @@ CSFML_API sfSound* sfSound_Create();
|
|||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing sound
|
||||
///
|
||||
/// \param Sound : Sound to delete
|
||||
/// \param sound : Sound to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_Destroy(sfSound* Sound);
|
||||
CSFML_API void sfSound_Destroy(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Start playing a sound
|
||||
///
|
||||
/// \param Sound : Sound to play
|
||||
/// \param sound : Sound to play
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_Play(sfSound* Sound);
|
||||
CSFML_API void sfSound_Play(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Pause a sound
|
||||
///
|
||||
/// \param Sound : Sound to pause
|
||||
/// \param sound : Sound to pause
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_Pause(sfSound* Sound);
|
||||
CSFML_API void sfSound_Pause(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Stop playing a sound
|
||||
///
|
||||
/// \param Sound : Sound to stop
|
||||
/// \param sound : Sound to stop
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_Stop(sfSound* Sound);
|
||||
CSFML_API void sfSound_Stop(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Bind a sound buffer to a sound
|
||||
///
|
||||
/// \param Sound : Sound to set the loop state
|
||||
/// \param Buffer : Buffer to bind
|
||||
/// \param sound : Sound to set the loop state
|
||||
/// \param buffer : Buffer to bind
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetBuffer(sfSound* Sound, sfSoundBuffer* Buffer);
|
||||
CSFML_API void sfSound_SetBuffer(sfSound* sound, sfSoundBuffer* buffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sound buffer bound to a sound
|
||||
///
|
||||
/// \param Sound : Sound to get the buffer from
|
||||
/// \param sound : Sound to get the buffer from
|
||||
///
|
||||
/// \return Pointer to the sound's buffer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSound_GetBuffer(sfSound* Sound);
|
||||
CSFML_API sfSoundBuffer* sfSound_GetBuffer(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set a sound loop state
|
||||
///
|
||||
/// \param Sound : Sound to set the loop state
|
||||
/// \param Loop : sfTrue to play in loop, sfFalse to play once
|
||||
/// \param sound : Sound to set the loop state
|
||||
/// \param loop : sfTrue to play in loop, sfFalse to play once
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetLoop(sfSound* Sound, sfBool Loop);
|
||||
CSFML_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell whether or not a sound is looping
|
||||
///
|
||||
/// \param Sound : Sound to get the loop state from
|
||||
/// \param sound : Sound to get the loop state from
|
||||
///
|
||||
/// \return sfTrue if the sound is looping, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSound_GetLoop(sfSound* Sound);
|
||||
CSFML_API sfBool sfSound_GetLoop(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the status of a sound (stopped, paused, playing)
|
||||
///
|
||||
/// \param Sound : Sound to get the status from
|
||||
/// \param sound : Sound to get the status from
|
||||
///
|
||||
/// \return Current status of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStatus sfSound_GetStatus(sfSound* Sound);
|
||||
CSFML_API sfSoundStatus sfSound_GetStatus(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the pitch of a sound
|
||||
///
|
||||
/// \param Sound : Sound to modify
|
||||
/// \param Pitch : New pitch
|
||||
/// \param sound : Sound to modify
|
||||
/// \param pitch : New pitch
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetPitch(sfSound* Sound, float Pitch);
|
||||
CSFML_API void sfSound_SetPitch(sfSound* sound, float pitch);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the volume of a sound
|
||||
///
|
||||
/// \param Sound : Sound to modify
|
||||
/// \param Volume : Volume (in range [0, 100])
|
||||
/// \param sound : Sound to modify
|
||||
/// \param volume : Volume (in range [0, 100])
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetVolume(sfSound* Sound, float Volume);
|
||||
CSFML_API void sfSound_SetVolume(sfSound* sound, float volume);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the position of a sound
|
||||
///
|
||||
/// \param Sound : Sound to modify
|
||||
/// \param X : X position of the sound in the world
|
||||
/// \param Y : Y position of the sound in the world
|
||||
/// \param Z : Z position of the sound in the world
|
||||
/// \param sound : Sound to modify
|
||||
/// \param x : X position of the sound in the world
|
||||
/// \param y : Y position of the sound in the world
|
||||
/// \param z : Z position of the sound in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetPosition(sfSound* Sound, float X, float Y, float Z);
|
||||
CSFML_API void sfSound_SetPosition(sfSound* sound, float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Make the sound's position relative to the listener's
|
||||
/// position, or absolute.
|
||||
/// The default value is false (absolute)
|
||||
///
|
||||
/// \param Sound : Sound to modify
|
||||
/// \param Relative : True to set the position relative, false to set it absolute
|
||||
/// \param sound : Sound to modify
|
||||
/// \param relative : True to set the position relative, false to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetRelativeToListener(sfSound* Sound, sfBool Relative);
|
||||
CSFML_API void sfSound_SetRelativeToListener(sfSound* sound, sfBool relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the minimum distance - closer than this distance,
|
||||
/// the listener will hear the sound at its maximum volume.
|
||||
/// The default minimum distance is 1.0
|
||||
///
|
||||
/// \param Sound : Sound to modify
|
||||
/// \param MinDistance : New minimum distance for the sound
|
||||
/// \param sound : Sound to modify
|
||||
/// \param distance : New minimum distance for the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetMinDistance(sfSound* Sound, float MinDistance);
|
||||
CSFML_API void sfSound_SetMinDistance(sfSound* sound, float distance);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the attenuation factor - the higher the attenuation, the
|
||||
/// more the sound will be attenuated with distance from listener.
|
||||
/// The default attenuation factor is 1.0
|
||||
///
|
||||
/// \param Sound : Sound to modify
|
||||
/// \param Attenuation : New attenuation factor for the sound
|
||||
/// \param sound : Sound to modify
|
||||
/// \param attenuation : New attenuation factor for the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetAttenuation(sfSound* Sound, float Attenuation);
|
||||
CSFML_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the current playing position of a sound
|
||||
///
|
||||
/// \param Sound : Sound to modify
|
||||
/// \param TimeOffset : New playing position, expressed in seconds
|
||||
/// \param sound : Sound to modify
|
||||
/// \param timeOffset : New playing position, expressed in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetPlayingOffset(sfSound* Sound, float TimeOffset);
|
||||
CSFML_API void sfSound_SetPlayingOffset(sfSound* sound, float timeOffset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the pitch of a sound
|
||||
///
|
||||
/// \param Sound : Sound to get the pitch from
|
||||
/// \param sound : Sound to get the pitch from
|
||||
///
|
||||
/// \return Pitch value
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetPitch(sfSound* Sound);
|
||||
CSFML_API float sfSound_GetPitch(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the volume of a sound
|
||||
///
|
||||
/// \param Sound : Sound to get the volume from
|
||||
/// \param sound : Sound to get the volume from
|
||||
///
|
||||
/// \return Volume value (in range [1, 100])
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetVolume(sfSound* Sound);
|
||||
CSFML_API float sfSound_GetVolume(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the position of a sound
|
||||
///
|
||||
/// \param Sound : Sound to get the position from
|
||||
/// \param X : X position of the sound in the world
|
||||
/// \param Y : Y position of the sound in the world
|
||||
/// \param Z : Z position of the sound in the world
|
||||
/// \param sound : Sound to get the position from
|
||||
/// \param x : X position of the sound in the world
|
||||
/// \param y : Y position of the sound in the world
|
||||
/// \param z : Z position of the sound in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_GetPosition(sfSound* Sound, float* X, float* Y, float* Z);
|
||||
CSFML_API void sfSound_GetPosition(sfSound* sound, float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the sound's position is relative to the listener's
|
||||
/// position, or if it's absolute
|
||||
///
|
||||
/// \param Sound : Sound to check
|
||||
/// \param sound : Sound to check
|
||||
///
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSound_IsRelativeToListener(sfSound* Sound);
|
||||
CSFML_API sfBool sfSound_IsRelativeToListener(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a sound
|
||||
///
|
||||
/// \param Sound : Sound to get the minimum distance from
|
||||
/// \param sound : Sound to get the minimum distance from
|
||||
///
|
||||
/// \return Minimum distance for the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetMinDistance(sfSound* Sound);
|
||||
CSFML_API float sfSound_GetMinDistance(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the attenuation factor of a sound
|
||||
///
|
||||
/// \param Sound : Sound to get the attenuation factor from
|
||||
/// \param sound : Sound to get the attenuation factor from
|
||||
///
|
||||
/// \return Attenuation factor for the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetAttenuation(sfSound* Sound);
|
||||
CSFML_API float sfSound_GetAttenuation(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current playing position of a sound
|
||||
///
|
||||
/// \param Sound : Sound to get the position from
|
||||
/// \param sound : Sound to get the position from
|
||||
///
|
||||
/// \return Current playing position, expressed in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetPlayingOffset(sfSound* Sound);
|
||||
CSFML_API float sfSound_GetPlayingOffset(sfSound* sound);
|
||||
|
||||
|
||||
#endif // SFML_SOUND_H
|
||||
|
|
|
@ -35,107 +35,107 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
/// Create a new sound buffer and load it from a file
|
||||
///
|
||||
/// \param Filename : Path of the music file to open
|
||||
/// \param filename : Path of the music file to open
|
||||
///
|
||||
/// \return A new sfSoundBuffer object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* Filename);
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Create a new sound buffer and load it from a file in memory
|
||||
///
|
||||
/// \param Data : Pointer to the file data in memory
|
||||
/// \param SizeInBytes : Size of the data to load, in bytes
|
||||
/// \param data : Pointer to the file data in memory
|
||||
/// \param sizeInBytes : Size of the data to load, in bytes
|
||||
///
|
||||
/// \return A new sfSoundBuffer object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const char* Data, size_t SizeInBytes);
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const char* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Create a new sound buffer and load it from an array of
|
||||
/// samples in memory - assumed format for samples is
|
||||
/// 16 bits signed integer
|
||||
///
|
||||
/// \param Samples : Pointer to the samples in memory
|
||||
/// \param SamplesCount : Number of samples pointed by Samples
|
||||
/// \param ChannelsCount : Number of channels (1 = mono, 2 = stereo, ...)
|
||||
/// \param SampleRate : Frequency (number of samples to play per second)
|
||||
/// \param samples : Pointer to the samples in memory
|
||||
/// \param samplesCount : Number of samples pointed by Samples
|
||||
/// \param channelsCount : Number of channels (1 = mono, 2 = stereo, ...)
|
||||
/// \param sampleRate : Frequency (number of samples to play per second)
|
||||
///
|
||||
/// \return A new sfSoundBuffer object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* Samples, size_t SamplesCount, unsigned int ChannelsCount, unsigned int SampleRate);
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* samples, size_t samplesCount, unsigned int channelsCount, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing sound buffer
|
||||
///
|
||||
/// \param SoundBuffer : Sound buffer to delete
|
||||
/// \param soundBuffer : Sound buffer to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundBuffer_Destroy(sfSoundBuffer* SoundBuffer);
|
||||
CSFML_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Save a sound buffer to a file
|
||||
///
|
||||
/// \param SoundBuffer : Sound buffer to save
|
||||
/// \param Filename : Path of the sound file to write
|
||||
/// \param soundBuffer : Sound buffer to save
|
||||
/// \param filename : Path of the sound file to write
|
||||
///
|
||||
/// \return sfTrue if saving has been successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundBuffer_SaveToFile(sfSoundBuffer* SoundBuffer, const char* Filename);
|
||||
CSFML_API sfBool sfSoundBuffer_SaveToFile(sfSoundBuffer* soundBuffer, const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the samples contained in a sound buffer
|
||||
///
|
||||
/// \param SoundBuffer : Sound buffer to get samples from
|
||||
/// \param soundBuffer : Sound buffer to get samples from
|
||||
///
|
||||
/// \return Pointer to the array of sound samples, in 16 bits signed integer format
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const sfInt16* sfSoundBuffer_GetSamples(sfSoundBuffer* SoundBuffer);
|
||||
CSFML_API const sfInt16* sfSoundBuffer_GetSamples(sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the number of samples contained in a sound buffer
|
||||
///
|
||||
/// \param SoundBuffer : Sound buffer to get samples count from
|
||||
/// \param soundBuffer : Sound buffer to get samples count from
|
||||
///
|
||||
/// \return Number of samples
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfSoundBuffer_GetSamplesCount(sfSoundBuffer* SoundBuffer);
|
||||
CSFML_API size_t sfSoundBuffer_GetSamplesCount(sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sample rate of a sound buffer
|
||||
///
|
||||
/// \param SoundBuffer : Sound buffer to get sample rate from
|
||||
/// \param soundBuffer : Sound buffer to get sample rate from
|
||||
///
|
||||
/// \return Sound frequency (number of samples per second)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBuffer_GetSampleRate(sfSoundBuffer* SoundBuffer);
|
||||
CSFML_API unsigned int sfSoundBuffer_GetSampleRate(sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the number of channels of a sound buffer (1 = mono, 2 = stereo, ...)
|
||||
///
|
||||
/// \param SoundBuffer : Sound buffer to get channels count from
|
||||
/// \param soundBuffer : Sound buffer to get channels count from
|
||||
///
|
||||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBuffer_GetChannelsCount(sfSoundBuffer* SoundBuffer);
|
||||
CSFML_API unsigned int sfSoundBuffer_GetChannelsCount(sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the duration of a sound buffer
|
||||
///
|
||||
/// \param SoundBuffer : Sound buffer to get duration from
|
||||
/// \param soundBuffer : Sound buffer to get duration from
|
||||
///
|
||||
/// \return Sound duration, in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundBuffer_GetDuration(sfSoundBuffer* SoundBuffer);
|
||||
CSFML_API float sfSoundBuffer_GetDuration(sfSoundBuffer* soundBuffer);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDBUFFER_H
|
||||
|
|
|
@ -43,49 +43,49 @@ CSFML_API sfSoundBufferRecorder* sfSoundBufferRecorder_Create();
|
|||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing sound buffer recorder
|
||||
///
|
||||
/// \param SoundBufferRecorder : Sound buffer recorder to delete
|
||||
/// \param soundBufferRecorder : Sound buffer recorder to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* SoundBufferRecorder);
|
||||
CSFML_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Start the capture.
|
||||
/// Warning : only one capture can happen at the same time
|
||||
///
|
||||
/// \param SoundBufferRecorder : Sound bufferrecorder to start
|
||||
/// \param SampleRate : Sound frequency (the more samples, the higher the quality)
|
||||
/// \param soundBufferRecorder : Sound buffer recorder to start
|
||||
/// \param sampleRate : Sound frequency (the more samples, the higher the quality)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* SoundBufferRecorder, unsigned int SampleRate);
|
||||
CSFML_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* soundBufferRecorder, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Stop the capture
|
||||
///
|
||||
/// \param SoundBufferRecorder : Sound buffer recorder to stop
|
||||
/// \param soundBufferRecorder : Sound buffer recorder to stop
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* SoundBufferRecorder);
|
||||
CSFML_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sample rate of a sound buffer recorder
|
||||
///
|
||||
/// \param SoundBufferRecorder : Sound buffer recorder to get sample rate from
|
||||
/// \param soundBufferRecorder : Sound buffer recorder to get sample rate from
|
||||
///
|
||||
/// \return Frequency, in samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBufferRecorder_GetSampleRate(sfSoundBufferRecorder* SoundBufferRecorder);
|
||||
CSFML_API unsigned int sfSoundBufferRecorder_GetSampleRate(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sound buffer containing the captured audio data
|
||||
/// of a sound buffer recorder
|
||||
///
|
||||
/// \param SoundBufferRecorder : Sound buffer recorder to get the sound buffer from
|
||||
/// \param soundBufferRecorder : Sound buffer recorder to get the sound buffer from
|
||||
///
|
||||
/// \return Pointer to the sound buffer (you don't need to destroy it after use)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBufferRecorder_GetBuffer(sfSoundBufferRecorder* SoundBufferRecorder);
|
||||
CSFML_API sfSoundBuffer* sfSoundBufferRecorder_GetBuffer(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDBUFFERRECORDER_H
|
||||
|
|
|
@ -41,54 +41,54 @@ typedef void (*sfSoundRecorderStopCallback)(void*);
|
|||
/// Construct a new sound recorder with callback functions
|
||||
/// for processing captured samples
|
||||
///
|
||||
/// \param OnStart : Callback function which will be called when a new capture starts (can be NULL)
|
||||
/// \param OnProcess : Callback function which will be called each time there's audio data to process
|
||||
/// \param OnStop : Callback function which will be called when the current capture stops (can be NULL)
|
||||
/// \param UserData : Data to pass to the callback function (can be NULL)
|
||||
/// \param onStart : Callback function which will be called when a new capture starts (can be NULL)
|
||||
/// \param onProcess : Callback function which will be called each time there's audio data to process
|
||||
/// \param onStop : Callback function which will be called when the current capture stops (can be NULL)
|
||||
/// \param userData : Data to pass to the callback function (can be NULL)
|
||||
///
|
||||
/// \return A new sfSoundRecorder object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCallback OnStart,
|
||||
sfSoundRecorderProcessCallback OnProcess,
|
||||
sfSoundRecorderStopCallback OnStop,
|
||||
void* UserData);
|
||||
CSFML_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCallback onStart,
|
||||
sfSoundRecorderProcessCallback onProcess,
|
||||
sfSoundRecorderStopCallback onStop,
|
||||
void* userData);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing sound recorder
|
||||
///
|
||||
/// \param SoundRecorder : Sound recorder to delete
|
||||
/// \param soundRecorder : Sound recorder to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundRecorder_Destroy(sfSoundRecorder* SoundRecorder);
|
||||
CSFML_API void sfSoundRecorder_Destroy(sfSoundRecorder* soundRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Start the capture.
|
||||
/// Warning : only one capture can happen at the same time
|
||||
///
|
||||
/// \param SoundRecorder : Sound recorder to start
|
||||
/// \param SampleRate : Sound frequency (the more samples, the higher the quality)
|
||||
/// \param soundRecorder : Sound recorder to start
|
||||
/// \param sampleRate : Sound frequency (the more samples, the higher the quality)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundRecorder_Start(sfSoundRecorder* SoundRecorder, unsigned int SampleRate);
|
||||
CSFML_API void sfSoundRecorder_Start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Stop the capture
|
||||
///
|
||||
/// \param SoundRecorder : Sound recorder to stop
|
||||
/// \param soundRecorder : Sound recorder to stop
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundRecorder_Stop(sfSoundRecorder* SoundRecorder);
|
||||
CSFML_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sample rate of a sound recorder
|
||||
///
|
||||
/// \param SoundRecorder : Sound recorder to get sample rate from
|
||||
/// \param soundRecorder : Sound recorder to get sample rate from
|
||||
///
|
||||
/// \return Frequency, in samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundRecorder_GetSampleRate(sfSoundRecorder* SoundRecorder);
|
||||
CSFML_API unsigned int sfSoundRecorder_GetSampleRate(sfSoundRecorder* soundRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the system supports sound capture.
|
||||
|
|
|
@ -50,245 +50,245 @@ typedef void (*sfSoundStreamSeekCallback)(float, void*); ///<
|
|||
////////////////////////////////////////////////////////////
|
||||
/// Construct a new sound stream
|
||||
///
|
||||
/// \param OnGetData : Function called when the stream needs more data (can't be NULL)
|
||||
/// \param OnSeek : Function called when the stream seeks (can't be NULL)
|
||||
/// \param ChannelsCount : Number of channels to use (1 = mono, 2 = stereo)
|
||||
/// \param SampleRate : Sample rate of the sound (44100 = CD quality)
|
||||
/// \param UserData : Data to pass to the callback functions
|
||||
/// \param onGetData : Function called when the stream needs more data (can't be NULL)
|
||||
/// \param onSeek : Function called when the stream seeks (can't be NULL)
|
||||
/// \param channelsCount : Number of channels to use (1 = mono, 2 = stereo)
|
||||
/// \param sampleRate : Sample rate of the sound (44100 = CD quality)
|
||||
/// \param userData : Data to pass to the callback functions
|
||||
///
|
||||
/// \return A new sfSoundStream object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStream* sfSoundStream_Create(sfSoundStreamGetDataCallback OnGetData,
|
||||
sfSoundStreamSeekCallback OnSeek,
|
||||
unsigned int ChannelsCount,
|
||||
unsigned int SampleRate,
|
||||
void* UserData);
|
||||
CSFML_API sfSoundStream* sfSoundStream_Create(sfSoundStreamGetDataCallback onGetData,
|
||||
sfSoundStreamSeekCallback onSeek,
|
||||
unsigned int channelsCount,
|
||||
unsigned int sampleRate,
|
||||
void* userData);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to delete
|
||||
/// \param soundStream : Sound stream to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_Destroy(sfSoundStream* SoundStreamStream);
|
||||
CSFML_API void sfSoundStream_Destroy(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Start playing a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to play
|
||||
/// \param soundStream : Sound stream to play
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_Play(sfSoundStream* SoundStream);
|
||||
CSFML_API void sfSoundStream_Play(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Pause a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to pause
|
||||
/// \param soundStream : Sound stream to pause
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_Pause(sfSoundStream* SoundStream);
|
||||
CSFML_API void sfSoundStream_Pause(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Stop playing a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to stop
|
||||
/// \param soundStream : Sound stream to stop
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_Stop(sfSoundStream* SoundStream);
|
||||
CSFML_API void sfSoundStream_Stop(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the status of a sound stream (stopped, paused, playing)
|
||||
///
|
||||
/// \param SoundStream : Sound stream to get the status from
|
||||
/// \param soundStream : Sound stream to get the status from
|
||||
///
|
||||
/// \return Current status of the sound stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStatus sfSoundStream_GetStatus(sfSoundStream* SoundStream);
|
||||
CSFML_API sfSoundStatus sfSoundStream_GetStatus(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the number of channels of a sound stream
|
||||
/// (1 = mono, 2 = stereo)
|
||||
///
|
||||
/// \param SoundStream : Sound stream to get the channels count from
|
||||
/// \param soundStream : Sound stream to get the channels count from
|
||||
///
|
||||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundStream_GetChannelsCount(sfSoundStream* SoundStream);
|
||||
CSFML_API unsigned int sfSoundStream_GetChannelsCount(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sample rate of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to get the sample rate from
|
||||
/// \param soundStream : Sound stream to get the sample rate from
|
||||
///
|
||||
/// \return Stream frequency (number of samples per second)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundStream_GetSampleRate(sfSoundStream* SoundStream);
|
||||
CSFML_API unsigned int sfSoundStream_GetSampleRate(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the pitch of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to modify
|
||||
/// \param Pitch : New pitch
|
||||
/// \param soundStream : Sound stream to modify
|
||||
/// \param pitch : New pitch
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetPitch(sfSoundStream* SoundStream, float Pitch);
|
||||
CSFML_API void sfSoundStream_SetPitch(sfSoundStream* soundStream, float pitch);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the volume of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to modify
|
||||
/// \param Volume : Volume (in range [0, 100])
|
||||
/// \param soundStream : Sound stream to modify
|
||||
/// \param volume : Volume (in range [0, 100])
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetVolume(sfSoundStream* SoundStream, float Volume);
|
||||
CSFML_API void sfSoundStream_SetVolume(sfSoundStream* soundStream, float volume);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the position of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to modify
|
||||
/// \param X : X position of the sound stream in the world
|
||||
/// \param Y : Y position of the sound stream in the world
|
||||
/// \param Z : Z position of the sound stream in the world
|
||||
/// \param soundStream : Sound stream to modify
|
||||
/// \param x : X position of the sound stream in the world
|
||||
/// \param y : Y position of the sound stream in the world
|
||||
/// \param z : Z position of the sound stream in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetPosition(sfSoundStream* SoundStream, float X, float Y, float Z);
|
||||
CSFML_API void sfSoundStream_SetPosition(sfSoundStream* soundStream, float x, float y, float z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Make the sound stream's position relative to the listener's
|
||||
/// position, or absolute.
|
||||
/// The default value is false (absolute)
|
||||
///
|
||||
/// \param SoundStream : Sound stream to modify
|
||||
/// \param Relative : True to set the position relative, false to set it absolute
|
||||
/// \param soundStream : Sound stream to modify
|
||||
/// \param relative : True to set the position relative, false to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetRelativeToListener(sfSoundStream* SoundStream, sfBool Relative);
|
||||
CSFML_API void sfSoundStream_SetRelativeToListener(sfSoundStream* soundStream, sfBool relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// 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
|
||||
///
|
||||
/// \param SoundStream : Sound stream to modify
|
||||
/// \param MinDistance : New minimum distance for the sound stream
|
||||
/// \param soundStream : Sound stream to modify
|
||||
/// \param distance : New minimum distance for the sound stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetMinDistance(sfSoundStream* SoundStream, float MinDistance);
|
||||
CSFML_API void sfSoundStream_SetMinDistance(sfSoundStream* soundStream, float distance);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// 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
|
||||
///
|
||||
/// \param SoundStream : Sound stream to modify
|
||||
/// \param Attenuation : New attenuation factor for the sound stream
|
||||
/// \param soundStream : Sound stream to modify
|
||||
/// \param attenuation : New attenuation factor for the sound stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetAttenuation(sfSoundStream* SoundStream, float Attenuation);
|
||||
CSFML_API void sfSoundStream_SetAttenuation(sfSoundStream* soundStream, float attenuation);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the current playing position of a stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to modify
|
||||
/// \param TimeOffset : New playing position, expressed in seconds
|
||||
/// \param soundStream : Sound stream to modify
|
||||
/// \param timeOffset : New playing position, expressed in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetPlayingOffset(sfSoundStream* SoundStream, float TimeOffset);
|
||||
CSFML_API void sfSoundStream_SetPlayingOffset(sfSoundStream* soundStream, float timeOffset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set a stream loop state
|
||||
///
|
||||
/// \param SoundStream : Stream to set the loop state
|
||||
/// \param Loop : sfTrue to play in loop, sfFalse to play once
|
||||
/// \param soundStream : Stream to set the loop state
|
||||
/// \param loop : sfTrue to play in loop, sfFalse to play once
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetLoop(sfSoundStream* SoundStream, sfBool Loop);
|
||||
CSFML_API void sfSoundStream_SetLoop(sfSoundStream* soundStream, sfBool loop);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the pitch of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to get the pitch from
|
||||
/// \param soundStream : Sound stream to get the pitch from
|
||||
///
|
||||
/// \return Pitch value
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetPitch(sfSoundStream* SoundStream);
|
||||
CSFML_API float sfSoundStream_GetPitch(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the volume of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to get the volume from
|
||||
/// \param soundStream : Sound stream to get the volume from
|
||||
///
|
||||
/// \return Volume value (in range [1, 100])
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetVolume(sfSoundStream* SoundStream);
|
||||
CSFML_API float sfSoundStream_GetVolume(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the position of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to get the position from
|
||||
/// \param X : X position of the sound stream in the world
|
||||
/// \param Y : Y position of the sound stream in the world
|
||||
/// \param Z : Z position of the sound stream in the world
|
||||
/// \param soundStream : Sound stream to get the position from
|
||||
/// \param x : X position of the sound stream in the world
|
||||
/// \param y : Y position of the sound stream in the world
|
||||
/// \param z : Z position of the sound stream in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_GetPosition(sfSoundStream* SoundStream, float* X, float* Y, float* Z);
|
||||
CSFML_API void sfSoundStream_GetPosition(sfSoundStream* soundStream, float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the sound stream's position is relative to the listener's
|
||||
/// position, or if it's absolute
|
||||
///
|
||||
/// \param SoundStream : Sound stream to check
|
||||
/// \param soundStream : Sound stream to check
|
||||
///
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundStream_IsRelativeToListener(sfSoundStream* SoundStream);
|
||||
CSFML_API sfBool sfSoundStream_IsRelativeToListener(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to get the minimum distance from
|
||||
/// \param soundStream : Sound stream to get the minimum distance from
|
||||
///
|
||||
/// \return Minimum distance for the sound stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetMinDistance(sfSoundStream* SoundStream);
|
||||
CSFML_API float sfSoundStream_GetMinDistance(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the attenuation factor of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to get the attenuation factor from
|
||||
/// \param soundStream : Sound stream to get the attenuation factor from
|
||||
///
|
||||
/// \return Attenuation factor for the sound stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetAttenuation(sfSoundStream* SoundStream);
|
||||
CSFML_API float sfSoundStream_GetAttenuation(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell whether or not a stream is looping
|
||||
///
|
||||
/// \param SoundStream : Soundstream to get the loop state from
|
||||
/// \param soundStream : Soundstream to get the loop state from
|
||||
///
|
||||
/// \return sfTrue if the stream is looping, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundStream_GetLoop(sfSoundStream* SoundStream);
|
||||
CSFML_API sfBool sfSoundStream_GetLoop(sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current playing position of a sound stream
|
||||
///
|
||||
/// \param SoundStream : Sound stream to get the position from
|
||||
/// \param soundStream : Sound stream to get the position from
|
||||
///
|
||||
/// \return Current playing position, expressed in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetPlayingOffset(sfSoundStream* SoundStream);
|
||||
CSFML_API float sfSoundStream_GetPlayingOffset(sfSoundStream* soundStream);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDSTREAM_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue