Skip to content

CF_SoundParams

Category: audio
GitHub: cute_audio.h


Parameters for the function cf_play_sound.

Struct Members Description
bool paused Default: false. True to start the sound in a paused state. False to start immediately playing the sound.
bool looped Default: false. True to loop the sound.
float volume Default: 0.5f. A volume control from 0.0f to 1.0f. 0.0f meaning silent, 1.0f meaning max volume.
float pan Default: 0.5f. A stereo pan control from 0.0f to 1.0f. 0.0f means left-speaker, 1.0f means right speaker, 0.5f means equal both.
float pitch Default: 1.0f. Lower numbers lower the pitch and increase playback speed. Higher numbers increase the pitch and reduce playback speed.
int sample_index Default: 0. Specify the sample to start playing at. In term of seconds this would be the cf_audio_sample_rate seconds.

Remarks

You can use default settings from the cf_sound_params_defaults function.

cf_sound_get_pitch
CF_Sound
cf_sound_params_defaults
cf_play_sound
cf_sound_is_active
cf_sound_get_is_paused
cf_sound_get_is_looped
cf_sound_get_volume
cf_sound_get_sample_index
cf_sound_set_sample_index
cf_sound_set_is_paused
cf_sound_set_is_looped
cf_sound_set_volume
cf_sound_stop

cf_sound_set_pitch