Updated to the new naming convention

This commit is contained in:
Laurent Gomila committed 2012-03-18 10:45:20 +01:00
1 parent 9d0d0588b2
commit 36904a45d9
99 files changed
+2409 -2369

No files matched your search

+6 -6
View File
@@ -42,7 +42,7 @@
/// \param volume New global volume, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfListener_SetGlobalVolume(float volume);
CSFML_AUDIO_API void sfListener_setGlobalVolume(float volume);
////////////////////////////////////////////////////////////
/// \brief Get the current value of the global volume
@@ -50,7 +50,7 @@ CSFML_AUDIO_API void sfListener_SetGlobalVolume(float volume);
/// \return Current global volume, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API float sfListener_GetGlobalVolume(void);
CSFML_AUDIO_API float sfListener_getGlobalVolume(void);
////////////////////////////////////////////////////////////
/// \brief Set the position of the listener in the scene
@@ -60,7 +60,7 @@ CSFML_AUDIO_API float sfListener_GetGlobalVolume(void);
/// \param position New position of the listener
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfListener_SetPosition(sfVector3f position);
CSFML_AUDIO_API void sfListener_setPosition(sfVector3f position);
////////////////////////////////////////////////////////////
/// \brief Get the current position of the listener in the scene
@@ -68,7 +68,7 @@ CSFML_AUDIO_API void sfListener_SetPosition(sfVector3f position);
/// \return The listener's position
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfVector3f sfListener_GetPosition();
CSFML_AUDIO_API sfVector3f sfListener_getPosition();
////////////////////////////////////////////////////////////
/// \brief Set the orientation of the listener in the scene
@@ -81,7 +81,7 @@ CSFML_AUDIO_API sfVector3f sfListener_GetPosition();
/// \param position New direction of the listener
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfListener_SetDirection(sfVector3f orientation);
CSFML_AUDIO_API void sfListener_setDirection(sfVector3f orientation);
////////////////////////////////////////////////////////////
/// \brief Get the current orientation of the listener in the scene
@@ -89,7 +89,7 @@ CSFML_AUDIO_API void sfListener_SetDirection(sfVector3f orientation);
/// \return The listener's direction
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfVector3f sfListener_GetDirection();
CSFML_AUDIO_API sfVector3f sfListener_getDirection();
#endif // SFML_LISTENER_H
+31 -31
View File
@@ -41,7 +41,7 @@
/// \brief Create a new music and load it from a file
///
/// This function doesn't start playing the music (call
/// sfMusic_Play to do so).
/// sfMusic_play to do so).
/// Here is a complete list of all the supported audio formats:
/// ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam,
/// w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.
@@ -51,13 +51,13 @@
/// \return A new sfMusic object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfMusic* sfMusic_CreateFromFile(const char* filename);
CSFML_AUDIO_API sfMusic* sfMusic_createFromFile(const char* filename);
////////////////////////////////////////////////////////////
/// \brief Create a new music and load it from a file in memory
///
/// This function doesn't start playing the music (call
/// sfMusic_Play to do so).
/// sfMusic_play to do so).
/// Here is a complete list of all the supported audio formats:
/// ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam,
/// w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.
@@ -68,13 +68,13 @@ CSFML_AUDIO_API sfMusic* sfMusic_CreateFromFile(const char* filename);
/// \return A new sfMusic object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeInBytes);
CSFML_AUDIO_API sfMusic* sfMusic_createFromMemory(const void* data, size_t sizeInBytes);
////////////////////////////////////////////////////////////
/// \brief Create a new music and load it from a custom stream
///
/// This function doesn't start playing the music (call
/// sfMusic_Play to do so).
/// sfMusic_play to do so).
/// Here is a complete list of all the supported audio formats:
/// ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam,
/// w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.
@@ -84,7 +84,7 @@ CSFML_AUDIO_API sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeI
/// \return A new sfMusic object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfMusic* sfMusic_CreateFromStream(sfInputStream* stream);
CSFML_AUDIO_API sfMusic* sfMusic_createFromStream(sfInputStream* stream);
////////////////////////////////////////////////////////////
/// \brief Destroy a music
@@ -92,21 +92,21 @@ CSFML_AUDIO_API sfMusic* sfMusic_CreateFromStream(sfInputStream* stream);
/// \param music Music to destroy
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_Destroy(sfMusic* music);
CSFML_AUDIO_API void sfMusic_destroy(sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Set whether or not a music should loop after reaching the end
///
/// If set, the music will restart from beginning after
/// reaching the end and so on, until it is stopped or
/// sfMusic_SetLoop(music, sfFalse) is called.
/// sfMusic_setLoop(music, sfFalse) is called.
/// The default looping state for musics is false.
///
/// \param music Music object
/// \param loop sfTrue to play in loop, sfFalse to play once
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
CSFML_AUDIO_API void sfMusic_setLoop(sfMusic* music, sfBool loop);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not a music is in loop mode
@@ -116,7 +116,7 @@ CSFML_AUDIO_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
/// \return sfTrue if the music is looping, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfBool sfMusic_GetLoop(const sfMusic* music);
CSFML_AUDIO_API sfBool sfMusic_getLoop(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the total duration of a music
@@ -126,7 +126,7 @@ CSFML_AUDIO_API sfBool sfMusic_GetLoop(const sfMusic* music);
/// \return Music duration
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfTime sfMusic_GetDuration(const sfMusic* music);
CSFML_AUDIO_API sfTime sfMusic_getDuration(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Start or resume playing a music
@@ -140,7 +140,7 @@ CSFML_AUDIO_API sfTime sfMusic_GetDuration(const sfMusic* music);
/// \param music Music object
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_Play(sfMusic* music);
CSFML_AUDIO_API void sfMusic_play(sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Pause a music
@@ -151,7 +151,7 @@ CSFML_AUDIO_API void sfMusic_Play(sfMusic* music);
/// \param music Music object
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_Pause(sfMusic* music);
CSFML_AUDIO_API void sfMusic_pause(sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Stop playing a music
@@ -163,7 +163,7 @@ CSFML_AUDIO_API void sfMusic_Pause(sfMusic* music);
/// \param music Music object
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_Stop(sfMusic* music);
CSFML_AUDIO_API void sfMusic_stop(sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Return the number of channels of a music
@@ -175,7 +175,7 @@ CSFML_AUDIO_API void sfMusic_Stop(sfMusic* music);
/// \return Number of channels
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API unsigned int sfMusic_GetChannelCount(const sfMusic* music);
CSFML_AUDIO_API unsigned int sfMusic_getChannelCount(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the sample rate of a music
@@ -188,7 +188,7 @@ CSFML_AUDIO_API unsigned int sfMusic_GetChannelCount(const sfMusic* music);
/// \return Sample rate, in number of samples per second
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API unsigned int sfMusic_GetSampleRate(const sfMusic* music);
CSFML_AUDIO_API unsigned int sfMusic_getSampleRate(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the current status of a music (stopped, paused, playing)
@@ -198,7 +198,7 @@ CSFML_AUDIO_API unsigned int sfMusic_GetSampleRate(const sfMusic* music);
/// \return Current status
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
CSFML_AUDIO_API sfSoundStatus sfMusic_getStatus(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the current playing position of a music
@@ -208,7 +208,7 @@ CSFML_AUDIO_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
/// \return Current playing position
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfTime sfMusic_GetPlayingOffset(const sfMusic* music);
CSFML_AUDIO_API sfTime sfMusic_getPlayingOffset(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Set the pitch of a music
@@ -223,7 +223,7 @@ CSFML_AUDIO_API sfTime sfMusic_GetPlayingOffset(const sfMusic* music);
/// \param pitch New pitch to apply to the music
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_SetPitch(sfMusic* music, float pitch);
CSFML_AUDIO_API void sfMusic_setPitch(sfMusic* music, float pitch);
////////////////////////////////////////////////////////////
/// \brief Set the volume of a music
@@ -235,7 +235,7 @@ CSFML_AUDIO_API void sfMusic_SetPitch(sfMusic* music, float pitch);
/// \param volume Volume of the music
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_SetVolume(sfMusic* music, float volume);
CSFML_AUDIO_API void sfMusic_setVolume(sfMusic* music, float volume);
////////////////////////////////////////////////////////////
/// \brief Set the 3D position of a music in the audio scene
@@ -248,7 +248,7 @@ CSFML_AUDIO_API void sfMusic_SetVolume(sfMusic* music, float volume);
/// \param position Position of the music in the scene
//
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_SetPosition(sfMusic* music, sfVector3f position);
CSFML_AUDIO_API void sfMusic_setPosition(sfMusic* music, sfVector3f position);
////////////////////////////////////////////////////////////
/// \brief Make a musics's position relative to the listener or absolute
@@ -263,7 +263,7 @@ CSFML_AUDIO_API void sfMusic_SetPosition(sfMusic* music, sfVector3f position);
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_SetRelativeToListener(sfMusic* music, sfBool relative);
CSFML_AUDIO_API void sfMusic_setRelativeToListener(sfMusic* music, sfBool relative);
////////////////////////////////////////////////////////////
/// \brief Set the minimum distance of a music
@@ -279,7 +279,7 @@ CSFML_AUDIO_API void sfMusic_SetRelativeToListener(sfMusic* music, sfBool relati
/// \param distance New minimum distance of the music
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_SetMinDistance(sfMusic* music, float distance);
CSFML_AUDIO_API void sfMusic_setMinDistance(sfMusic* music, float distance);
////////////////////////////////////////////////////////////
/// \brief Set the attenuation factor of a music
@@ -297,7 +297,7 @@ CSFML_AUDIO_API void sfMusic_SetMinDistance(sfMusic* music, float distance);
/// \param attenuation New attenuation factor of the music
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_SetAttenuation(sfMusic* music, float attenuation);
CSFML_AUDIO_API void sfMusic_setAttenuation(sfMusic* music, float attenuation);
////////////////////////////////////////////////////////////
/// \brief Change the current playing position of a music
@@ -309,7 +309,7 @@ CSFML_AUDIO_API void sfMusic_SetAttenuation(sfMusic* music, float attenuation);
/// \param timeOffset New playing position, in milliseconds
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfMusic_SetPlayingOffset(sfMusic* music, sfUint32 timeOffset);
CSFML_AUDIO_API void sfMusic_setPlayingOffset(sfMusic* music, sfUint32 timeOffset);
////////////////////////////////////////////////////////////
/// \brief Get the pitch of a music
@@ -319,7 +319,7 @@ CSFML_AUDIO_API void sfMusic_SetPlayingOffset(sfMusic* music, sfUint32 timeOffse
/// \return Pitch of the music
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API float sfMusic_GetPitch(const sfMusic* music);
CSFML_AUDIO_API float sfMusic_getPitch(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the volume of a music
@@ -329,7 +329,7 @@ CSFML_AUDIO_API float sfMusic_GetPitch(const sfMusic* music);
/// \return Volume of the music, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API float sfMusic_GetVolume(const sfMusic* music);
CSFML_AUDIO_API float sfMusic_getVolume(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the 3D position of a music in the audio scene
@@ -339,7 +339,7 @@ CSFML_AUDIO_API float sfMusic_GetVolume(const sfMusic* music);
/// \return Position of the music in the world
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfVector3f sfMusic_GetPosition(const sfMusic* music);
CSFML_AUDIO_API sfVector3f sfMusic_getPosition(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Tell whether a music's position is relative to the
@@ -350,7 +350,7 @@ CSFML_AUDIO_API sfVector3f sfMusic_GetPosition(const sfMusic* music);
/// \return sfTrue if the position is relative, sfFalse if it's absolute
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfBool sfMusic_IsRelativeToListener(const sfMusic* music);
CSFML_AUDIO_API sfBool sfMusic_isRelativeToListener(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the minimum distance of a music
@@ -360,7 +360,7 @@ CSFML_AUDIO_API sfBool sfMusic_IsRelativeToListener(const sfMusic* music);
/// \return Minimum distance of the music
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API float sfMusic_GetMinDistance(const sfMusic* music);
CSFML_AUDIO_API float sfMusic_getMinDistance(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the attenuation factor of a music
@@ -370,7 +370,7 @@ CSFML_AUDIO_API float sfMusic_GetMinDistance(const sfMusic* music);
/// \return Attenuation factor of the music
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API float sfMusic_GetAttenuation(const sfMusic* music);
CSFML_AUDIO_API float sfMusic_getAttenuation(const sfMusic* music);
#endif // SFML_MUSIC_H
+27 -27
View File
@@ -41,7 +41,7 @@
/// \return A new sfSound object
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSound* sfSound_Create(void);
CSFML_AUDIO_API sfSound* sfSound_create(void);
////////////////////////////////////////////////////////////
/// \brief Create a new sound by copying an existing one
@@ -51,7 +51,7 @@ CSFML_AUDIO_API sfSound* sfSound_Create(void);
/// \return A new sfSound object which is a copy of \a sound
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSound* sfSound_Copy(sfSound* sound);
CSFML_AUDIO_API sfSound* sfSound_copy(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Destroy a sound
@@ -59,7 +59,7 @@ CSFML_AUDIO_API sfSound* sfSound_Copy(sfSound* sound);
/// \param sound Sound to destroy
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_Destroy(sfSound* sound);
CSFML_AUDIO_API void sfSound_destroy(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Start or resume playing a sound
@@ -73,7 +73,7 @@ CSFML_AUDIO_API void sfSound_Destroy(sfSound* sound);
/// \param sound Sound object
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_Play(sfSound* sound);
CSFML_AUDIO_API void sfSound_play(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Pause a sound
@@ -84,19 +84,19 @@ CSFML_AUDIO_API void sfSound_Play(sfSound* sound);
/// \param sound Sound object
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_Pause(sfSound* sound);
CSFML_AUDIO_API void sfSound_pause(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Stop playing a sound
///
/// This function stops the sound if it was playing or paused,
/// and does nothing if it was already stopped.
/// It also resets the playing position (unlike sfSound_Pause).
/// It also resets the playing position (unlike sfSound_pause).
///
/// \param sound Sound object
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_Stop(sfSound* sound);
CSFML_AUDIO_API void sfSound_stop(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Set the source buffer containing the audio data to play
@@ -109,7 +109,7 @@ CSFML_AUDIO_API void sfSound_Stop(sfSound* sound);
/// \param buffer Sound buffer to attach to the sound
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_SetBuffer(sfSound* sound, const sfSoundBuffer* buffer);
CSFML_AUDIO_API void sfSound_setBuffer(sfSound* sound, const sfSoundBuffer* buffer);
////////////////////////////////////////////////////////////
/// \brief Get the audio buffer attached to a sound
@@ -119,21 +119,21 @@ CSFML_AUDIO_API void sfSound_SetBuffer(sfSound* sound, const sfSoundBuffer* buff
/// \return Sound buffer attached to the sound (can be NULL)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API const sfSoundBuffer* sfSound_GetBuffer(const sfSound* sound);
CSFML_AUDIO_API const sfSoundBuffer* sfSound_getBuffer(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Set whether or not a sound should loop after reaching the end
///
/// If set, the sound will restart from beginning after
/// reaching the end and so on, until it is stopped or
/// sfSound_SetLoop(sound, sfFalse) is called.
/// sfSound_setLoop(sound, sfFalse) is called.
/// The default looping state for sounds is false.
///
/// \param sound Sound object
/// \param loop sfTrue to play in loop, sfFalse to play once
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
CSFML_AUDIO_API void sfSound_setLoop(sfSound* sound, sfBool loop);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not a soud is in loop mode
@@ -143,7 +143,7 @@ CSFML_AUDIO_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
/// \return sfTrue if the sound is looping, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfBool sfSound_GetLoop(const sfSound* sound);
CSFML_AUDIO_API sfBool sfSound_getLoop(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the current status of a sound (stopped, paused, playing)
@@ -153,7 +153,7 @@ CSFML_AUDIO_API sfBool sfSound_GetLoop(const sfSound* sound);
/// \return Current status
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundStatus sfSound_GetStatus(const sfSound* sound);
CSFML_AUDIO_API sfSoundStatus sfSound_getStatus(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Set the pitch of a sound
@@ -168,7 +168,7 @@ CSFML_AUDIO_API sfSoundStatus sfSound_GetStatus(const sfSound* sound);
/// \param pitch New pitch to apply to the sound
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_SetPitch(sfSound* sound, float pitch);
CSFML_AUDIO_API void sfSound_setPitch(sfSound* sound, float pitch);
////////////////////////////////////////////////////////////
/// \brief Set the volume of a sound
@@ -180,7 +180,7 @@ CSFML_AUDIO_API void sfSound_SetPitch(sfSound* sound, float pitch);
/// \param volume Volume of the sound
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_SetVolume(sfSound* sound, float volume);
CSFML_AUDIO_API void sfSound_setVolume(sfSound* sound, float volume);
////////////////////////////////////////////////////////////
/// \brief Set the 3D position of a sound in the audio scene
@@ -193,7 +193,7 @@ CSFML_AUDIO_API void sfSound_SetVolume(sfSound* sound, float volume);
/// \param position Position of the sound in the scene
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_SetPosition(sfSound* sound, sfVector3f position);
CSFML_AUDIO_API void sfSound_setPosition(sfSound* sound, sfVector3f position);
////////////////////////////////////////////////////////////
/// \brief Make the sound's position relative to the listener or absolute
@@ -208,7 +208,7 @@ CSFML_AUDIO_API void sfSound_SetPosition(sfSound* sound, sfVector3f position);
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_SetRelativeToListener(sfSound* sound, sfBool relative);
CSFML_AUDIO_API void sfSound_setRelativeToListener(sfSound* sound, sfBool relative);
////////////////////////////////////////////////////////////
/// \brief Set the minimum distance of a sound
@@ -224,7 +224,7 @@ CSFML_AUDIO_API void sfSound_SetRelativeToListener(sfSound* sound, sfBool relati
/// \param distance New minimum distance of the sound
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_SetMinDistance(sfSound* sound, float distance);
CSFML_AUDIO_API void sfSound_setMinDistance(sfSound* sound, float distance);
////////////////////////////////////////////////////////////
/// \brief Set the attenuation factor of a sound
@@ -242,7 +242,7 @@ CSFML_AUDIO_API void sfSound_SetMinDistance(sfSound* sound, float distance);
/// \param attenuation New attenuation factor of the sound
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
CSFML_AUDIO_API void sfSound_setAttenuation(sfSound* sound, float attenuation);
////////////////////////////////////////////////////////////
/// \brief Change the current playing position of a sound
@@ -254,7 +254,7 @@ CSFML_AUDIO_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
/// \param timeOffset New playing position
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSound_SetPlayingOffset(sfSound* sound, sfTime timeOffset);
CSFML_AUDIO_API void sfSound_setPlayingOffset(sfSound* sound, sfTime timeOffset);
////////////////////////////////////////////////////////////
/// \brief Get the pitch of a sound
@@ -264,7 +264,7 @@ CSFML_AUDIO_API void sfSound_SetPlayingOffset(sfSound* sound, sfTime timeOffset)
/// \return Pitch of the sound
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API float sfSound_GetPitch(const sfSound* sound);
CSFML_AUDIO_API float sfSound_getPitch(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the volume of a sound
@@ -274,7 +274,7 @@ CSFML_AUDIO_API float sfSound_GetPitch(const sfSound* sound);
/// \return Volume of the sound, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API float sfSound_GetVolume(const sfSound* sound);
CSFML_AUDIO_API float sfSound_getVolume(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the 3D position of a sound in the audio scene
@@ -284,7 +284,7 @@ CSFML_AUDIO_API float sfSound_GetVolume(const sfSound* sound);
/// \return Position of the sound in the world
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfVector3f sfSound_GetPosition(const sfSound* sound);
CSFML_AUDIO_API sfVector3f sfSound_getPosition(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Tell whether a sound's position is relative to the
@@ -295,7 +295,7 @@ CSFML_AUDIO_API sfVector3f sfSound_GetPosition(const sfSound* sound);
/// \return sfTrue if the position is relative, sfFalse if it's absolute
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfBool sfSound_IsRelativeToListener(const sfSound* sound);
CSFML_AUDIO_API sfBool sfSound_isRelativeToListener(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the minimum distance of a sound
@@ -305,7 +305,7 @@ CSFML_AUDIO_API sfBool sfSound_IsRelativeToListener(const sfSound* sound);
/// \return Minimum distance of the sound
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API float sfSound_GetMinDistance(const sfSound* sound);
CSFML_AUDIO_API float sfSound_getMinDistance(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the attenuation factor of a sound
@@ -315,7 +315,7 @@ CSFML_AUDIO_API float sfSound_GetMinDistance(const sfSound* sound);
/// \return Attenuation factor of the sound
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API float sfSound_GetAttenuation(const sfSound* sound);
CSFML_AUDIO_API float sfSound_getAttenuation(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the current playing position of a sound
@@ -325,7 +325,7 @@ CSFML_AUDIO_API float sfSound_GetAttenuation(const sfSound* sound);
/// \return Current playing position
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfTime sfSound_GetPlayingOffset(const sfSound* sound);
CSFML_AUDIO_API sfTime sfSound_getPlayingOffset(const sfSound* sound);
#endif // SFML_SOUND_H
+13 -13
View File
@@ -47,7 +47,7 @@
/// \return A new sfSoundBuffer object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* filename);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromFile(const char* filename);
////////////////////////////////////////////////////////////
/// \brief Create a new sound buffer and load it from a file in memory
@@ -62,7 +62,7 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* filename
/// \return A new sfSoundBuffer object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const void* data, size_t sizeInBytes);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromMemory(const void* data, size_t sizeInBytes);
////////////////////////////////////////////////////////////
/// \brief Create a new sound buffer and load it from a custom stream
@@ -76,7 +76,7 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const void* data,
/// \return A new sfSoundBuffer object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromStream(sfInputStream* stream);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromStream(sfInputStream* stream);
////////////////////////////////////////////////////////////
/// \brief Create a new sound buffer and load it from an array of samples in memory
@@ -92,7 +92,7 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromStream(sfInputStream* str
/// \return A new sfSoundBuffer object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* samples, size_t sampleCount, unsigned int channelsCount, unsigned int sampleRate);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromSamples(const sfInt16* samples, size_t sampleCount, unsigned int channelCount, unsigned int sampleRate);
////////////////////////////////////////////////////////////
/// \brief Create a new sound buffer by copying an existing one
@@ -102,7 +102,7 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* sa
/// \return A new sfSoundBuffer object which is a copy of \a soundBuffer
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_Copy(sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_copy(sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Destroy a sound buffer
@@ -110,7 +110,7 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_Copy(sfSoundBuffer* soundBuffer);
/// \param soundBuffer Sound buffer to destroy
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API void sfSoundBuffer_destroy(sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Save a sound buffer to an audio file
@@ -125,7 +125,7 @@ CSFML_AUDIO_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
/// \return sfTrue if saving succeeded, sfFalse if it failed
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
CSFML_AUDIO_API sfBool sfSoundBuffer_saveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
////////////////////////////////////////////////////////////
/// \brief Get the array of audio samples stored in a sound buffer
@@ -139,20 +139,20 @@ CSFML_AUDIO_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer
/// \return Read-only pointer to the array of sound samples
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API const sfInt16* sfSoundBuffer_GetSamples(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API const sfInt16* sfSoundBuffer_getSamples(const sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Get the number of samples stored in a sound buffer
///
/// The array of samples can be accessed with the
/// sfSoundBuffer_GetSamples function.
/// sfSoundBuffer_getSamples function.
///
/// \param soundBuffer Sound buffer object
///
/// \return Number of samples
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API size_t sfSoundBuffer_GetSampleCount(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API size_t sfSoundBuffer_getSampleCount(const sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Get the sample rate of a sound buffer
@@ -166,7 +166,7 @@ CSFML_AUDIO_API size_t sfSoundBuffer_GetSampleCount(const sfSoundBuffer* soundBu
/// \return Sample rate (number of samples per second)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API unsigned int sfSoundBuffer_getSampleRate(const sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Get the number of channels used by a sound buffer
@@ -179,7 +179,7 @@ CSFML_AUDIO_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* so
/// \return Number of channels
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API unsigned int sfSoundBuffer_getChannelCount(const sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Get the total duration of a sound buffer
@@ -189,7 +189,7 @@ CSFML_AUDIO_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer*
/// \return Sound duration
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfTime sfSoundBuffer_GetDuration(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API sfTime sfSoundBuffer_getDuration(const sfSoundBuffer* soundBuffer);
#endif // SFML_SOUNDBUFFER_H
+6 -6
View File
@@ -38,7 +38,7 @@
/// \return A new sfSoundBufferRecorder object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundBufferRecorder* sfSoundBufferRecorder_Create(void);
CSFML_AUDIO_API sfSoundBufferRecorder* sfSoundBufferRecorder_create(void);
////////////////////////////////////////////////////////////
/// \brief Destroy a sound buffer recorder
@@ -46,7 +46,7 @@ CSFML_AUDIO_API sfSoundBufferRecorder* sfSoundBufferRecorder_Create(void);
/// \param soundBufferRecorder Sound buffer recorder to destroy
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* soundBufferRecorder);
CSFML_AUDIO_API void sfSoundBufferRecorder_destroy(sfSoundBufferRecorder* soundBufferRecorder);
////////////////////////////////////////////////////////////
/// \brief Start the capture of a sound recorder recorder
@@ -62,7 +62,7 @@ CSFML_AUDIO_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* soundB
/// \param sampleRate Desired capture rate, in number of samples per second
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* soundBufferRecorder, unsigned int sampleRate);
CSFML_AUDIO_API void sfSoundBufferRecorder_start(sfSoundBufferRecorder* soundBufferRecorder, unsigned int sampleRate);
////////////////////////////////////////////////////////////
/// \brief Stop the capture of a sound recorder
@@ -70,7 +70,7 @@ CSFML_AUDIO_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* soundBuf
/// \param soundBufferRecorder Sound buffer recorder object
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBufferRecorder);
CSFML_AUDIO_API void sfSoundBufferRecorder_stop(sfSoundBufferRecorder* soundBufferRecorder);
////////////////////////////////////////////////////////////
/// \brief Get the sample rate of a sound buffer recorder
@@ -84,7 +84,7 @@ CSFML_AUDIO_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBuff
/// \return Sample rate, in samples per second
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API unsigned int sfSoundBufferRecorder_GetSampleRate(const sfSoundBufferRecorder* soundBufferRecorder);
CSFML_AUDIO_API unsigned int sfSoundBufferRecorder_getSampleRate(const sfSoundBufferRecorder* soundBufferRecorder);
////////////////////////////////////////////////////////////
/// \brief Get the sound buffer containing the captured audio data
@@ -99,7 +99,7 @@ CSFML_AUDIO_API unsigned int sfSoundBufferRecorder_GetSampleRate(const sfSoundBu
/// \return Read-only access to the sound buffer
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API const sfSoundBuffer* sfSoundBufferRecorder_GetBuffer(const sfSoundBufferRecorder* soundBufferRecorder);
CSFML_AUDIO_API const sfSoundBuffer* sfSoundBufferRecorder_getBuffer(const sfSoundBufferRecorder* soundBufferRecorder);
#endif // SFML_SOUNDBUFFERRECORDER_H
+9 -9
View File
@@ -49,10 +49,10 @@ typedef void (*sfSoundRecorderStopCallback)(void*);
/// \return A new sfSoundRecorder object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCallback onStart,
sfSoundRecorderProcessCallback onProcess,
sfSoundRecorderStopCallback onStop,
void* userData);
CSFML_AUDIO_API sfSoundRecorder* sfSoundRecorder_create(sfSoundRecorderStartCallback onStart,
sfSoundRecorderProcessCallback onProcess,
sfSoundRecorderStopCallback onStop,
void* userData);
////////////////////////////////////////////////////////////
/// \brief Destroy a sound recorder
@@ -60,7 +60,7 @@ CSFML_AUDIO_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCall
/// \param soundRecorder Sound recorder to destroy
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSoundRecorder_Destroy(sfSoundRecorder* soundRecorder);
CSFML_AUDIO_API void sfSoundRecorder_destroy(sfSoundRecorder* soundRecorder);
////////////////////////////////////////////////////////////
/// \brief Start the capture of a sound recorder
@@ -76,7 +76,7 @@ CSFML_AUDIO_API void sfSoundRecorder_Destroy(sfSoundRecorder* soundRecorder);
/// \param sampleRate Desired capture rate, in number of samples per second
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSoundRecorder_Start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
CSFML_AUDIO_API void sfSoundRecorder_start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
////////////////////////////////////////////////////////////
/// \brief Stop the capture of a sound recorder
@@ -84,7 +84,7 @@ CSFML_AUDIO_API void sfSoundRecorder_Start(sfSoundRecorder* soundRecorder, unsig
/// \param soundRecorder Sound recorder object
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
CSFML_AUDIO_API void sfSoundRecorder_stop(sfSoundRecorder* soundRecorder);
////////////////////////////////////////////////////////////
/// \brief Get the sample rate of a sound recorder
@@ -98,7 +98,7 @@ CSFML_AUDIO_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
/// \return Sample rate, in samples per second
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API unsigned int sfSoundRecorder_GetSampleRate(const sfSoundRecorder* soundRecorder);
CSFML_AUDIO_API unsigned int sfSoundRecorder_getSampleRate(const sfSoundRecorder* soundRecorder);
////////////////////////////////////////////////////////////
/// \brief Check if the system supports audio capture
@@ -110,7 +110,7 @@ CSFML_AUDIO_API unsigned int sfSoundRecorder_GetSampleRate(const sfSoundRecorder
/// \return sfTrue if audio capture is supported, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfBool sfSoundRecorder_IsAvailable(void);
CSFML_AUDIO_API sfBool sfSoundRecorder_isAvailable(void);
#endif // SFML_SOUNDRECORDER_H
+2 -2
View File
@@ -41,8 +41,8 @@
////////////////////////////////////////////////////////////
typedef struct
{
sfInt16* Samples; ///< Pointer to the audio samples
unsigned int SampleCount; ///< Number of samples pointed by Samples
sfInt16* samples; ///< Pointer to the audio samples
unsigned int sampleCount; ///< Number of samples pointed by Samples
} sfSoundStreamChunk;
typedef sfBool (*sfSoundStreamGetDataCallback)(sfSoundStreamChunk*, void*); ///< Type of the callback used to get a sound stream data