mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
Updated to the new time API (sfTime)
This commit is contained in:
1 parent
44d4c4e707
commit
7615382a68
28 files changed
+293
-95
No files matched your search
@@ -32,6 +32,7 @@
|
||||
#include <SFML/Audio/SoundStatus.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/InputStream.h>
|
||||
#include <SFML/System/Time.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
@@ -121,10 +122,10 @@ CSFML_API sfBool sfMusic_GetLoop(const sfMusic* music);
|
||||
///
|
||||
/// \param music Music object
|
||||
///
|
||||
/// \return Music duration, in milliseconds
|
||||
/// \return Music duration
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfUint32 sfMusic_GetDuration(const sfMusic* music);
|
||||
CSFML_API sfTime sfMusic_GetDuration(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start or resume playing a music
|
||||
@@ -203,10 +204,10 @@ CSFML_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
|
||||
///
|
||||
/// \param music Music object
|
||||
///
|
||||
/// \return Current playing position, in milliseconds
|
||||
/// \return Current playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfUint32 sfMusic_GetPlayingOffset(const sfMusic* music);
|
||||
CSFML_API sfTime sfMusic_GetPlayingOffset(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the pitch of a music
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/SoundStatus.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -251,10 +252,10 @@ CSFML_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
|
||||
/// either paused or playing.
|
||||
///
|
||||
/// \param sound Sound object
|
||||
/// \param timeOffset New playing position, in milliseconds
|
||||
/// \param timeOffset New playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetPlayingOffset(sfSound* sound, sfUint32 timeOffset);
|
||||
CSFML_API void sfSound_SetPlayingOffset(sfSound* sound, sfTime timeOffset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the pitch of a sound
|
||||
@@ -323,10 +324,10 @@ CSFML_API float sfSound_GetAttenuation(const sfSound* sound);
|
||||
///
|
||||
/// \param sound Sound object
|
||||
///
|
||||
/// \return Current playing position, in milliseconds
|
||||
/// \return Current playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfUint32 sfSound_GetPlayingOffset(const sfSound* sound);
|
||||
CSFML_API sfTime sfSound_GetPlayingOffset(const sfSound* sound);
|
||||
|
||||
|
||||
#endif // SFML_SOUND_H
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/InputStream.h>
|
||||
#include <SFML/System/Time.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
@@ -185,10 +186,10 @@ CSFML_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer* soundB
|
||||
///
|
||||
/// \param soundBuffer Sound buffer object
|
||||
///
|
||||
/// \return Sound duration, in milliseconds
|
||||
/// \return Sound duration
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfUint32 sfSoundBuffer_GetDuration(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_API sfTime sfSoundBuffer_GetDuration(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDBUFFER_H
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/Audio/SoundStatus.h>
|
||||
#include <SFML/Audio/Types.h>
|
||||
#include <SFML/System/Time.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -44,7 +45,7 @@ typedef struct
|
||||
} sfSoundStreamChunk;
|
||||
|
||||
typedef sfBool (*sfSoundStreamGetDataCallback)(sfSoundStreamChunk*, void*); ///< Type of the callback used to get a sound stream data
|
||||
typedef void (*sfSoundStreamSeekCallback)(sfUint32, void*); ///< Type of the callback used to seek in a sound stream
|
||||
typedef void (*sfSoundStreamSeekCallback)(sfTime, void*); ///< Type of the callback used to seek in a sound stream
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -243,10 +244,10 @@ CSFML_API void sfSoundStream_SetAttenuation(sfSoundStream* soundStream, float at
|
||||
/// either paused or playing.
|
||||
///
|
||||
/// \param soundStream Sound stream object
|
||||
/// \param timeOffset New playing position, in milliseconds
|
||||
/// \param timeOffset New playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_SetPlayingOffset(sfSoundStream* soundStream, sfUint32 timeOffset);
|
||||
CSFML_API void sfSoundStream_SetPlayingOffset(sfSoundStream* soundStream, sfTime timeOffset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set whether or not a sound stream should loop after reaching the end
|
||||
@@ -339,10 +340,10 @@ CSFML_API sfBool sfSoundStream_GetLoop(const sfSoundStream* soundStream);
|
||||
///
|
||||
/// \param soundStream Sound stream object
|
||||
///
|
||||
/// \return Current playing position, in milliseconds
|
||||
/// \return Current playing position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfUint32 sfSoundStream_GetPlayingOffset(const sfSoundStream* soundStream);
|
||||
CSFML_API sfTime sfSoundStream_GetPlayingOffset(const sfSoundStream* soundStream);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDSTREAM_H
|
||||
Reference in new issue
Block a user