mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
Updated to the new graphics API
This commit is contained in:
1 parent
06997db9e8
commit
44670984af
51 files changed
+4607
-2573
No files matched your search
@@ -173,7 +173,7 @@ CSFML_API void sfMusic_Stop(sfMusic* music);
|
||||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfMusic_GetChannelsCount(const sfMusic* music);
|
||||
CSFML_API unsigned int sfMusic_GetChannelCount(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sample rate of a music
|
||||
|
||||
@@ -83,15 +83,15 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromStream(sfInputStream* stream);
|
||||
/// The assumed format of the audio samples is 16 bits signed integer
|
||||
/// (sfInt16).
|
||||
///
|
||||
/// \param samples Pointer to the array of samples in memory
|
||||
/// \param samplesCount Number of samples in the array
|
||||
/// \param channelsCount Number of channels (1 = mono, 2 = stereo, ...)
|
||||
/// \param sampleRate Sample rate (number of samples to play per second)
|
||||
/// \param samples Pointer to the array of samples in memory
|
||||
/// \param sampleCount Number of samples in the array
|
||||
/// \param channelCount Number of channels (1 = mono, 2 = stereo, ...)
|
||||
/// \param sampleRate Sample rate (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 sampleCount, unsigned int channelsCount, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new sound buffer by copying an existing one
|
||||
@@ -131,7 +131,7 @@ CSFML_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer, cons
|
||||
///
|
||||
/// The format of the returned samples is 16 bits signed integer
|
||||
/// (sfInt16). The total number of samples in this array
|
||||
/// is given by the sfSoundBuffer_GetSamplesCount function.
|
||||
/// is given by the sfSoundBuffer_GetSampleCount function.
|
||||
///
|
||||
/// \param soundBuffer Sound buffer object
|
||||
///
|
||||
@@ -151,7 +151,7 @@ CSFML_API const sfInt16* sfSoundBuffer_GetSamples(const sfSoundBuffer* soundBuff
|
||||
/// \return Number of samples
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfSoundBuffer_GetSamplesCount(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_API size_t sfSoundBuffer_GetSampleCount(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sample rate of a sound buffer
|
||||
@@ -178,7 +178,7 @@ CSFML_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* soundBuf
|
||||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBuffer_GetChannelsCount(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the total duration of a sound buffer
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
sfInt16* Samples; ///< Pointer to the audio samples
|
||||
unsigned int NbSamples; ///< 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
|
||||
@@ -50,18 +50,18 @@ typedef void (*sfSoundStreamSeekCallback)(sfUint32, void*); ///<
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create 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 channelCount 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
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStream* sfSoundStream_Create(sfSoundStreamGetDataCallback onGetData,
|
||||
sfSoundStreamSeekCallback onSeek,
|
||||
unsigned int channelsCount,
|
||||
unsigned int channelCount,
|
||||
unsigned int sampleRate,
|
||||
void* userData);
|
||||
|
||||
@@ -130,7 +130,7 @@ CSFML_API sfSoundStatus sfSoundStream_GetStatus(const sfSoundStream* soundStream
|
||||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundStream_GetChannelsCount(const sfSoundStream* soundStream);
|
||||
CSFML_API unsigned int sfSoundStream_GetChannelCount(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sample rate of a sound stream
|
||||
|
||||
Reference in new issue
Block a user