Loading...
Searching...
No Matches
Music.h
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
146CSFML_AUDIO_API void sfMusic_setEffectProcessor(sfMusic* music, sfEffectProcessor effectProcessor);
274CSFML_AUDIO_API const sfSoundChannel* sfMusic_getChannelMap(const sfMusic* music, size_t* count);
void(* sfEffectProcessor)(const float *inputFrames, unsigned int *inputFrameCount, float *outputFrames, unsigned int *outputFrameCount, unsigned int frameChannelCount)
Callable that is provided with sound data for processing.
Definition EffectProcessor.h:102
sfSoundStatus sfMusic_getStatus(const sfMusic *music)
Get the current status of a music (stopped, paused, playing)
sfTime sfMusic_getPlayingOffset(const sfMusic *music)
Get the current playing position of a music.
sfMusic * sfMusic_createFromStream(sfInputStream *stream)
Create a new music and load it from a custom stream.
void sfMusic_setCone(sfMusic *music, sfSoundSourceCone cone)
Set the cone properties of the sound in the audio scene.
const sfSoundChannel * sfMusic_getChannelMap(const sfMusic *music, size_t *count)
Get the map of position in sample frame to sound channel.
sfVector3f sfMusic_getDirection(const sfMusic *music)
Get the 3D direction of the sound in the audio scene.
sfVector3f sfMusic_getPosition(const sfMusic *music)
Get the 3D position of a music in the audio scene.
void sfMusic_setMaxGain(sfMusic *music, float gain)
Set the maximum gain of the sound.
void sfMusic_setPlayingOffset(sfMusic *music, sfTime timeOffset)
Change the current playing position of a music.
unsigned int sfMusic_getChannelCount(const sfMusic *music)
Return the number of channels of a music.
sfSoundSourceCone sfMusic_getCone(const sfMusic *music)
Get the cone properties of the sound in the audio scene.
void sfMusic_setLooping(sfMusic *music, bool loop)
Set whether or not a music should loop after reaching the end.
sfMusic * sfMusic_createFromMemory(const void *data, size_t sizeInBytes)
Create a new music and load it from a file in memory.
float sfMusic_getDopplerFactor(const sfMusic *music)
Get the doppler factor of the sound.
bool sfMusic_isLooping(const sfMusic *music)
Tell whether or not a music is in loop mode.
void sfMusic_setDirectionalAttenuationFactor(sfMusic *music, float factor)
Set the directional attenuation factor of the sound.
void sfMusic_setAttenuation(sfMusic *music, float attenuation)
Set the attenuation factor of a music.
void sfMusic_setLoopPoints(sfMusic *music, sfTimeSpan timePoints)
Sets the beginning and end of the sound's looping sequence using sfTime.
bool sfMusic_isRelativeToListener(const sfMusic *music)
Tell whether a music's position is relative to the listener or is absolute.
void sfMusic_setEffectProcessor(sfMusic *music, sfEffectProcessor effectProcessor)
Set the effect processor to be applied to the sound.
void sfMusic_setRelativeToListener(sfMusic *music, bool relative)
Make a musics's position relative to the listener or absolute.
float sfMusic_getAttenuation(const sfMusic *music)
Get the attenuation factor of a music.
sfMusic * sfMusic_createFromFile(const char *filename)
Create a new music and load it from a file.
void sfMusic_setDirection(sfMusic *music, sfVector3f direction)
Set the 3D direction of the sound in the audio scene.
void sfMusic_setPosition(sfMusic *music, sfVector3f position)
Set the 3D position of a music in the audio scene.
sfVector3f sfMusic_getVelocity(const sfMusic *music)
Get the 3D velocity of the sound in the audio scene.
sfTimeSpan sfMusic_getLoopPoints(const sfMusic *music)
Get the positions of the of the sound's looping sequence.
float sfMusic_getMaxDistance(const sfMusic *music)
Get the maximum distance of the sound.
void sfMusic_setMinDistance(sfMusic *music, float distance)
Set the minimum distance of a music.
sfTime sfMusic_getDuration(const sfMusic *music)
Get the total duration of a music.
void sfMusic_setDopplerFactor(sfMusic *music, float factor)
Set the doppler factor of the sound.
void sfMusic_setVelocity(sfMusic *music, sfVector3f velocity)
Set the 3D velocity of the sound in the audio scene.
unsigned int sfMusic_getSampleRate(const sfMusic *music)
Get the sample rate of a music.
void sfMusic_setMaxDistance(sfMusic *music, float distance)
Set the maximum distance of the sound.
void sfMusic_setSpatializationEnabled(sfMusic *music, bool enabled)
Set whether spatialization of the sound is enabled.
void sfMusic_setMinGain(sfMusic *music, float gain)
Set the minimum gain of the sound.
float sfMusic_getMinDistance(const sfMusic *music)
Get the minimum distance of a music.
float sfMusic_getDirectionalAttenuationFactor(const sfMusic *music)
Get the directional attenuation factor of the sound.
bool sfMusic_isSpatializationEnabled(const sfMusic *music)
Tell whether spatialization of the sound is enabled.
sfSoundChannel
Types of sound channels that can be read/written from sound buffers/files.
Definition SoundChannel.h:39
Set of callbacks that allow users to define custom file streams.
Definition InputStream.h:46
Structure defining the properties of a directional cone.
Definition SoundSourceCone.h:39