ALmixer
0.0.5
|
Fade and volume functions directly call OpenAL functions related to AL_GAIN. More...
Functions | |
ALint | ALmixer_FadeInChannelTimed (ALint which_channel, ALmixer_Data *almixer_data, ALint number_of_loops, ALuint fade_ticks, ALint expire_ticks) |
Similar to ALmixer_PlayChannelTimed except that sound volume fades in from the minimum volume to the current AL_GAIN over the specified amount of time. More... | |
ALint | ALmixer_FadeInChannel (ALint which_channel, ALmixer_Data *almixer_data, ALint number_of_loops, ALuint fade_ticks) |
The same as ALmixer_FadeInChannelTimed, but the sound is played without time limits. More... | |
ALuint | ALmixer_FadeInSourceTimed (ALuint al_source, ALmixer_Data *almixer_data, ALint number_of_loops, ALuint fade_ticks, ALint expire_ticks) |
Similar to ALmixer_PlaySourceTimed except that sound volume fades in from the minimum volume to the max volume over the specified amount of time. More... | |
ALuint | ALmixer_FadeInSource (ALuint al_source, ALmixer_Data *almixer_data, ALint number_of_loops, ALuint fade_ticks) |
The same as ALmixer_FadeInSourceTimed, but the sound is played without time limits. More... | |
ALint | ALmixer_FadeOutChannel (ALint which_channel, ALuint fade_ticks) |
Fade out a current playing channel. More... | |
ALint | ALmixer_FadeOutSource (ALuint al_source, ALuint fade_ticks) |
Fade out a current playing source. More... | |
ALint | ALmixer_FadeChannel (ALint which_channel, ALuint fade_ticks, ALfloat volume) |
Gradually changes the volume from the current AL_GAIN to the specified volume. More... | |
ALint | ALmixer_FadeSource (ALuint al_source, ALuint fade_ticks, ALfloat volume) |
Gradually changes the volume from the current AL_GAIN to the specified volume. More... | |
ALboolean | ALmixer_SetVolumeChannel (ALint which_channel, ALfloat volume) |
Sets the volume via the AL_GAIN source property. More... | |
ALboolean | ALmixer_SetVolumeSource (ALuint al_source, ALfloat volume) |
Sets the volume via the AL_GAIN source property. More... | |
ALfloat | ALmixer_GetVolumeChannel (ALint which_channel) |
Gets the volume via the AL_GAIN source property. More... | |
ALfloat | ALmixer_GetVolumeSource (ALuint al_source) |
Gets the volume via the AL_GAIN source property. More... | |
ALboolean | ALmixer_SetMaxVolumeChannel (ALint which_channel, ALfloat volume) |
Sets the maximum volume via the AL_MAX_GAIN source property. More... | |
ALboolean | ALmixer_SetMaxVolumeSource (ALuint al_source, ALfloat volume) |
Sets the maximum volume via the AL_MAX_GAIN source property. More... | |
ALfloat | ALmixer_GetMaxVolumeChannel (ALint which_channel) |
Gets the max volume via the AL_MAX_GAIN source property. More... | |
ALfloat | ALmixer_GetMaxVolumeSource (ALuint al_source) |
Gets the maximum volume via the AL_MAX_GAIN source property. More... | |
ALboolean | ALmixer_SetMinVolumeChannel (ALint which_channel, ALfloat volume) |
Sets the minimum volume via the AL_MIN_GAIN source property. More... | |
ALboolean | ALmixer_SetMinVolumeSource (ALuint al_source, ALfloat volume) |
Sets the minimum volume via the AL_MIN_GAIN source property. More... | |
ALfloat | ALmixer_GetMinVolumeChannel (ALint which_channel) |
Gets the min volume via the AL_MIN_GAIN source property. More... | |
ALfloat | ALmixer_GetMinVolumeSource (ALuint al_source) |
Gets the min volume via the AL_MIN_GAIN source property. More... | |
ALboolean | ALmixer_SetMasterVolume (ALfloat new_volume) |
Sets the OpenAL listener AL_GAIN which can be thought of as the "master volume". More... | |
ALfloat | ALmixer_GetMasterVolume (void) |
Gets the OpenAL listener AL_GAIN which can be thought of as the "master volume". More... | |
Fade and volume functions directly call OpenAL functions related to AL_GAIN.
These functions are provided mostly for those who just want to play audio but are not planning to use OpenAL features directly. If you are using OpenAL directly (e.g. for 3D effects), you may want to be careful about using these as they may fight/override values you directly set yourself.
ALint ALmixer_FadeChannel | ( | ALint | which_channel, |
ALuint | fade_ticks, | ||
ALfloat | volume | ||
) |
Gradually changes the volume from the current AL_GAIN to the specified volume.
Gradually changes the volume from the current AL_GAIN to the specified volume over the specified period of time. This is some times referred to as volume ducking. Note that this function works for setting the volume higher as well as lower.
which_channel | The channel to fade or -1 to fade all playing channels. |
fade_ticks | In milliseconds, the amount of time the volume change should take to complete. |
volume | The volume to change to. Valid values are 0.0 to 1.0. |
ALint ALmixer_FadeInChannel | ( | ALint | which_channel, |
ALmixer_Data * | almixer_data, | ||
ALint | number_of_loops, | ||
ALuint | fade_ticks | ||
) |
The same as ALmixer_FadeInChannelTimed, but the sound is played without time limits.
ALint ALmixer_FadeInChannelTimed | ( | ALint | which_channel, |
ALmixer_Data * | almixer_data, | ||
ALint | number_of_loops, | ||
ALuint | fade_ticks, | ||
ALint | expire_ticks | ||
) |
Similar to ALmixer_PlayChannelTimed except that sound volume fades in from the minimum volume to the current AL_GAIN over the specified amount of time.
ALuint ALmixer_FadeInSource | ( | ALuint | al_source, |
ALmixer_Data * | almixer_data, | ||
ALint | number_of_loops, | ||
ALuint | fade_ticks | ||
) |
The same as ALmixer_FadeInSourceTimed, but the sound is played without time limits.
ALuint ALmixer_FadeInSourceTimed | ( | ALuint | al_source, |
ALmixer_Data * | almixer_data, | ||
ALint | number_of_loops, | ||
ALuint | fade_ticks, | ||
ALint | expire_ticks | ||
) |
Similar to ALmixer_PlaySourceTimed except that sound volume fades in from the minimum volume to the max volume over the specified amount of time.
ALint ALmixer_FadeOutChannel | ( | ALint | which_channel, |
ALuint | fade_ticks | ||
) |
Fade out a current playing channel.
Will fade out a currently playing channel over the specified period of time starting from now. The volume will be changed from the current AL_GAIN level to the AL_MIN_GAIN. The volume fade will interpolate over the specified period of time. The playback will halt at the end of the time period.
which_channel | The channel to fade or -1 to fade all playing channels. |
fade_ticks | In milliseconds, the amount of time the fade out should take to complete. |
ALint ALmixer_FadeOutSource | ( | ALuint | al_source, |
ALuint | fade_ticks | ||
) |
Fade out a current playing source.
Will fade out a currently playing source over the specified period of time starting from now. The volume will be changed from the current AL_GAIN level to the AL_MIN_GAIN. The volume fade will interpolate over the specified period of time. The playback will halt at the end of the time period.
al_source | The source to fade or -1 to fade all playing sources. |
fade_ticks | In milliseconds, the amount of time the fade out should take to complete. |
ALint ALmixer_FadeSource | ( | ALuint | al_source, |
ALuint | fade_ticks, | ||
ALfloat | volume | ||
) |
Gradually changes the volume from the current AL_GAIN to the specified volume.
Gradually changes the volume from the current AL_GAIN to the specified volume over the specified period of time. This is some times referred to as volume ducking. Note that this function works for setting the volume higher as well as lower.
al_source | The source to fade or -1 to fade all playing sources. |
fade_ticks | In milliseconds, the amount of time the volume change should take to complete. |
volume | The volume to change to. Valid values are 0.0 to 1.0. |
ALfloat ALmixer_GetMasterVolume | ( | void | ) |
Gets the OpenAL listener AL_GAIN which can be thought of as the "master volume".
Gets the OpenAL listener AL_GAIN which can be thought of as the "master volume".
ALfloat ALmixer_GetMaxVolumeChannel | ( | ALint | which_channel | ) |
Gets the max volume via the AL_MAX_GAIN source property.
Gets the max volume for a given channel via the AL_MAX_GAIN source property.
which_channel | The channel to get the volume from. -1 will return the average volume set across all channels. |
ALfloat ALmixer_GetMaxVolumeSource | ( | ALuint | al_source | ) |
Gets the maximum volume via the AL_MAX_GAIN source property.
Gets the maximum volume for a given source via the AL_MAX_GAIN source property.
al_source | The source to set the volume to or 0 to set on all sources. 0 will return the average volume set across all channels. |
ALfloat ALmixer_GetMinVolumeChannel | ( | ALint | which_channel | ) |
Gets the min volume via the AL_MIN_GAIN source property.
Gets the min volume for a given channel via the AL_MIN_GAIN source property.
which_channel | The channel to get the volume from. -1 will return the average volume set across all channels. |
ALfloat ALmixer_GetMinVolumeSource | ( | ALuint | al_source | ) |
Gets the min volume via the AL_MIN_GAIN source property.
Gets the min volume for a given source via the AL_MIN_GAIN source property.
al_source | The source to set the volume to or 0 to set on all sources. 0 will return the average volume set across all channels. |
ALfloat ALmixer_GetVolumeChannel | ( | ALint | which_channel | ) |
Gets the volume via the AL_GAIN source property.
Gets the volume for a given channel via the AL_GAIN source property.
which_channel | The channel to get the volume from. -1 will return the average volume set across all channels. |
ALfloat ALmixer_GetVolumeSource | ( | ALuint | al_source | ) |
Gets the volume via the AL_GAIN source property.
Gets the volume for a given source via the AL_GAIN source property.
al_source | The source to get the volume from. -1 will return the average volume set across all source. |
ALboolean ALmixer_SetMasterVolume | ( | ALfloat | new_volume | ) |
Sets the OpenAL listener AL_GAIN which can be thought of as the "master volume".
Sets the OpenAL listener AL_GAIN which can be thought of as the "master volume".
new_volume | The new volume level to be set. Range is 0.0 to 1.0 where 1.0 is the max volume. |
ALboolean ALmixer_SetMaxVolumeChannel | ( | ALint | which_channel, |
ALfloat | volume | ||
) |
Sets the maximum volume via the AL_MAX_GAIN source property.
Sets the maximum volume for a given channel via the AL_MAX_GAIN source property. Max volumes will be clamped to this value.
which_channel | The channel to set the volume to or -1 to set on all channels. |
volume | The new volume to use. Valid values are 0.0 to 1.0. |
ALboolean ALmixer_SetMaxVolumeSource | ( | ALuint | al_source, |
ALfloat | volume | ||
) |
Sets the maximum volume via the AL_MAX_GAIN source property.
Sets the maximum volume for a given source via the AL_MAX_GAIN source property.
al_source | The source to set the volume to or 0 to set on all sources. |
volume | The new volume to use. Valid values are 0.0 to 1.0. |
ALboolean ALmixer_SetMinVolumeChannel | ( | ALint | which_channel, |
ALfloat | volume | ||
) |
Sets the minimum volume via the AL_MIN_GAIN source property.
Sets the minimum volume for a given channel via the AL_MIN_GAIN source property. Min volumes will be clamped to this value.
which_channel | The channel to set the volume to or -1 to set on all channels. |
volume | The new volume to use. Valid values are 0.0 to 1.0. |
ALboolean ALmixer_SetMinVolumeSource | ( | ALuint | al_source, |
ALfloat | volume | ||
) |
Sets the minimum volume via the AL_MIN_GAIN source property.
Sets the minimum volume for a given source via the AL_MIN_GAIN source property.
al_source | The source to set the volume to or 0 to set on all sources. |
volume | The new volume to use. Valid values are 0.0 to 1.0. |
ALboolean ALmixer_SetVolumeChannel | ( | ALint | which_channel, |
ALfloat | volume | ||
) |
Sets the volume via the AL_GAIN source property.
Sets the volume for a given channel via the AL_GAIN source property.
which_channel | The channel to set the volume to or -1 to set on all channels. |
volume | The new volume to use. Valid values are 0.0 to 1.0. |
ALboolean ALmixer_SetVolumeSource | ( | ALuint | al_source, |
ALfloat | volume | ||
) |
Sets the volume via the AL_GAIN source property.
Sets the volume for a given source via the AL_GAIN source property.
al_source | The source to set the volume to or 0 to set on all sources. |
volume | The new volume to use. Valid values are 0.0 to 1.0. |