#include <SFML/Config.h>
#include <SFML/Audio/SoundStatus.h>
Go to the source code of this file.
Typedefs | |
typedef sfMusic | sfMusic |
sfMusic defines a big sound played using streaming, so usually what we call a music :) | |
Functions | |
CSFML_API sfMusic * | sfMusic_CreateFromFile (const char *Filename) |
Create a new music and load it from a file. | |
CSFML_API sfMusic * | sfMusic_CreateFromMemory (const char *Data, size_t SizeInBytes) |
Create a new music and load it from a file in memory. | |
CSFML_API void | sfMusic_Destroy (sfMusic *Music) |
Destroy an existing music. | |
CSFML_API void | sfMusic_SetLoop (sfMusic *Music, sfBool Loop) |
Set a music loop state. | |
CSFML_API sfBool | sfMusic_GetLoop (sfMusic *Music) |
Tell whether or not a music is looping. | |
CSFML_API float | sfMusic_GetDuration (sfMusic *Music) |
Get a music duration. | |
CSFML_API void | sfMusic_Play (sfMusic *Music) |
Start playing a music. | |
CSFML_API void | sfMusic_Pause (sfMusic *Music) |
Pause a music. | |
CSFML_API void | sfMusic_Stop (sfMusic *Music) |
Stop playing a music. | |
CSFML_API unsigned int | sfMusic_GetChannelsCount (sfMusic *Music) |
Return the number of channels of a music (1 = mono, 2 = stereo). | |
CSFML_API unsigned int | sfMusic_GetSampleRate (sfMusic *Music) |
Get the stream sample rate of a music. | |
CSFML_API sfSoundStatus | sfMusic_GetStatus (sfMusic *Music) |
Get the status of a music (stopped, paused, playing). | |
CSFML_API void | sfMusic_SetPitch (sfMusic *Music, float Pitch) |
Set the pitch of a music. | |
CSFML_API void | sfMusic_SetVolume (sfMusic *Music, float Volume) |
Set the volume of a music. | |
CSFML_API void | sfMusic_SetPosition (sfMusic *Music, float X, float Y, float Z) |
Set the position of a music. | |
CSFML_API float | sfMusic_GetPitch (sfMusic *Music) |
Get the pitch of a music. | |
CSFML_API float | sfMusic_GetVolume (sfMusic *Music) |
Get the volume of a music. | |
CSFML_API void | sfMusic_GetPosition (sfMusic *Music, float *X, float *Y, float *Z) |
Get the position of a music. |
CSFML_API sfMusic* sfMusic_CreateFromFile | ( | const char * | Filename | ) |
Create a new music and load it from a file.
Filename | : Path of the music file to open |
CSFML_API sfMusic* sfMusic_CreateFromMemory | ( | const char * | Data, | |
size_t | SizeInBytes | |||
) |
Create a new music and load it from a file in memory.
Data | : Pointer to the file data in memory | |
SizeInBytes | : Size of the data to load, in bytes |
CSFML_API void sfMusic_Destroy | ( | sfMusic * | Music | ) |
Destroy an existing music.
Music | : Music to delete |
CSFML_API unsigned int sfMusic_GetChannelsCount | ( | sfMusic * | Music | ) |
Return the number of channels of a music (1 = mono, 2 = stereo).
Music | : Music to get the channels count from |
CSFML_API float sfMusic_GetDuration | ( | sfMusic * | Music | ) |
Get a music duration.
Music | : Music to get the duration from |
Tell whether or not a music is looping.
Music | : Music to get the loop state from |
CSFML_API float sfMusic_GetPitch | ( | sfMusic * | Music | ) |
Get the pitch of a music.
Music | : Music to get the pitch from |
CSFML_API void sfMusic_GetPosition | ( | sfMusic * | Music, | |
float * | X, | |||
float * | Y, | |||
float * | Z | |||
) |
Get the position of a music.
Music | : Music to get the position from | |
X | : X position of the sound in the world | |
Y | : Y position of the sound in the world | |
Z | : Z position of the sound in the world |
CSFML_API unsigned int sfMusic_GetSampleRate | ( | sfMusic * | Music | ) |
Get the stream sample rate of a music.
Music | : Music to get the sample rate from |
CSFML_API sfSoundStatus sfMusic_GetStatus | ( | sfMusic * | Music | ) |
Get the status of a music (stopped, paused, playing).
Music | : Music to get the status from |
CSFML_API float sfMusic_GetVolume | ( | sfMusic * | Music | ) |
Get the volume of a music.
Music | : Music to get the volume from |
CSFML_API void sfMusic_Pause | ( | sfMusic * | Music | ) |
Pause a music.
Music | : Music to pause |
CSFML_API void sfMusic_Play | ( | sfMusic * | Music | ) |
Start playing a music.
Music | : Music to play |
Set a music loop state.
Music | : Music to set the loop state | |
Loop | : sfTrue to play in loop, sfFalse to play once |
CSFML_API void sfMusic_SetPitch | ( | sfMusic * | Music, | |
float | Pitch | |||
) |
Set the pitch of a music.
Music | : Music to modify | |
Pitch | : New pitch |
CSFML_API void sfMusic_SetPosition | ( | sfMusic * | Music, | |
float | X, | |||
float | Y, | |||
float | Z | |||
) |
Set the position of a music.
Music | : Music to modify | |
X | : X position of the sound in the world | |
Y | : Y position of the sound in the world | |
Z | : Z position of the sound in the world |
CSFML_API void sfMusic_SetVolume | ( | sfMusic * | Music, | |
float | Volume | |||
) |
Set the volume of a music.
Music | : Music to modify | |
Volume | : Volume (in range [0, 100]) |
CSFML_API void sfMusic_Stop | ( | sfMusic * | Music | ) |
Stop playing a music.
Music | : Music to stop |