ALmixer
0.0.5
|
These are core functions that are useful for controlling playback. More...
Functions | |
ALint | ALmixer_GetTotalTime (ALmixer_Data *almixer_data) |
Returns the total time in milliseconds of the audio resource. More... | |
ALuint | ALmixer_GetSource (ALint which_channel) |
This function will look up the OpenAL source id for the corresponding channel number. More... | |
ALint | ALmixer_GetChannel (ALuint al_source) |
This function will look up the channel for the corresponding source. More... | |
ALint | ALmixer_FindFreeChannel (ALint start_channel) |
Will look for a channel available for playback. More... | |
ALint | ALmixer_PlayChannelTimed (ALint which_channel, ALmixer_Data *almixer_data, ALint number_of_loops, ALint number_of_milliseconds) |
Play a sound on a channel with a time limit. More... | |
ALint | ALmixer_PlayChannel (ALint which_channel, ALmixer_Data *almixer_data, ALint number_of_loops) |
The same as ALmixer_PlayChannelTimed, but the sound is played without time limits. More... | |
ALuint | ALmixer_PlaySourceTimed (ALuint al_source, ALmixer_Data *almixer_data, ALint number_of_loops, ALint number_of_milliseconds) |
Play a sound on an OpenAL source with a time limit. More... | |
ALuint | ALmixer_PlaySource (ALuint al_source, ALmixer_Data *almixer_data, ALint number_of_loops) |
The same as ALmixer_PlaySourceTimed, but the sound is played without time limits. More... | |
ALint | ALmixer_HaltChannel (ALint which_channel) |
Stops playback on a channel. More... | |
ALint | ALmixer_HaltSource (ALuint al_source) |
Stops playback on a channel. More... | |
ALboolean | ALmixer_RewindData (ALmixer_Data *almixer_data) |
Rewinds the sound to the beginning for a given data. More... | |
ALint | ALmixer_RewindChannel (ALint which_channel) |
Rewinds the sound to the beginning that is playing on a specific channel. More... | |
ALint | ALmixer_RewindSource (ALuint al_source) |
Rewinds the sound to the beginning that is playing on a specific source. More... | |
ALboolean | ALmixer_SeekData (ALmixer_Data *almixer_data, ALuint msec_pos) |
Seek the sound for a given data. More... | |
ALint | ALmixer_SeekChannel (ALint which_channel, ALuint msec_pos) |
Seeks the sound to the beginning that is playing on a specific channel. More... | |
ALint | ALmixer_SeekSource (ALuint al_source, ALuint msec_pos) |
Seeks the sound to the beginning that is playing on a specific source. More... | |
ALint | ALmixer_PauseChannel (ALint which_channel) |
Pauses playback on a channel. More... | |
ALint | ALmixer_PauseSource (ALuint al_source) |
Pauses playback on a source. More... | |
ALint | ALmixer_ResumeChannel (ALint which_channel) |
Resumes playback on a channel that is paused. More... | |
ALint | ALmixer_ResumeSource (ALuint al_source) |
Resumes playback on a source that is paused. More... | |
ALint | ALmixer_ExpireChannel (ALint which_channel, ALint number_of_milliseconds) |
Will cause a currently playing channel to stop playing in the specified number of milliseconds. More... | |
ALint | ALmixer_ExpireSource (ALuint al_source, ALint number_of_milliseconds) |
Will cause a currently playing source to stop playing in the specified number of milliseconds. More... | |
These are core functions that are useful for controlling playback.
Also see the Volume functions for additional playback functions and Query functions for additional information.
ALint ALmixer_ExpireChannel | ( | ALint | which_channel, |
ALint | number_of_milliseconds | ||
) |
Will cause a currently playing channel to stop playing in the specified number of milliseconds.
Will cause a currently playing channel to stop playing in the specified number of milliseconds. This will override the value that was set when PlayChannelTimed or PlaySourceTimed was called or override any previous calls to ExpireChannel or ExpireSource.
which_channel | The channel to expire or -1 to apply to all channels. |
number_of_milliseconds | How many milliseconds from now until the expire triggers. |
ALint ALmixer_ExpireSource | ( | ALuint | al_source, |
ALint | number_of_milliseconds | ||
) |
Will cause a currently playing source to stop playing in the specified number of milliseconds.
Will cause a currently playing source to stop playing in the specified number of milliseconds. This will override the value that was set when PlayChannelTimed or PlaySourceTimed was called or override any previous calls to ExpireChannel or ExpireSource.
al_source | The source to expire or 0 to apply to all sources. |
number_of_milliseconds | How many milliseconds from now until the expire triggers. |
ALint ALmixer_FindFreeChannel | ( | ALint | start_channel | ) |
Will look for a channel available for playback.
Given a start channel number, the search will increase to the highest channel until it finds one available.
start_channel | The channel number you want to start looking at. |
ALint ALmixer_GetChannel | ( | ALuint | al_source | ) |
This function will look up the channel for the corresponding source.
al_source | The source id you want to find the corresponding channel number for. If 0 is supplied, it will try to return the first channel not in use. Returns -1 on error, or the channel. |
ALuint ALmixer_GetSource | ( | ALint | which_channel | ) |
This function will look up the OpenAL source id for the corresponding channel number.
which_channel | The channel which you want to find the corresponding OpenAL source id for. If -1 was specified, an available source for playback will be returned. |
ALint ALmixer_GetTotalTime | ( | ALmixer_Data * | almixer_data | ) |
Returns the total time in milliseconds of the audio resource.
Returns the total time in milliseconds of the audio resource. If the total length cannot be determined, -1 will be returned.
almixer_data | The audio sample you want to know the total time of. |
ALint ALmixer_HaltChannel | ( | ALint | which_channel | ) |
Stops playback on a channel.
Stops playback on a channel and clears the channel so it can be played on again.
which_channel | The channel to halt or -1 to halt all channels. |
ALint ALmixer_HaltSource | ( | ALuint | al_source | ) |
Stops playback on a channel.
Stops playback on a channel and clears the channel so it can be played on again.
al_source | The source to halt or 0 to halt all sources. |
ALint ALmixer_PauseChannel | ( | ALint | which_channel | ) |
Pauses playback on a channel.
Pauses playback on a channel. Should have no effect on channels that aren't playing.
which_channel | The channel to pause or -1 to pause all channels. |
ALint ALmixer_PauseSource | ( | ALuint | al_source | ) |
Pauses playback on a source.
Pauses playback on a source. Should have no effect on source that aren't playing.
al_source | The source to pause or -1 to pause all source. |
ALint ALmixer_PlayChannel | ( | ALint | which_channel, |
ALmixer_Data * | almixer_data, | ||
ALint | number_of_loops | ||
) |
The same as ALmixer_PlayChannelTimed, but the sound is played without time limits.
ALint ALmixer_PlayChannelTimed | ( | ALint | which_channel, |
ALmixer_Data * | almixer_data, | ||
ALint | number_of_loops, | ||
ALint | number_of_milliseconds | ||
) |
Play a sound on a channel with a time limit.
Plays a sound on a channel and will auto-stop after a specified number of milliseconds.
which_channel | Allows you to specify the specific channel you want to play on. Channels range from 0 to the (Number of allocated channels - 1). If you specify -1, an available channel will be chosen automatically for you. |
almixer_data | The audio resource you want to play. |
number_of_loops | The number of times to loop (repeat) playing the data. 0 means the data will play exactly once without repeat. -1 means infinitely loop. |
number_of_milliseconds | The number of milliseconds that should be played until the sample is auto-stopped. -1 means don't auto-stop playing and let the sample finish playing normally (or if looping is set to infinite, the sample will never stop playing). |
ALuint ALmixer_PlaySource | ( | ALuint | al_source, |
ALmixer_Data * | almixer_data, | ||
ALint | number_of_loops | ||
) |
The same as ALmixer_PlaySourceTimed, but the sound is played without time limits.
ALuint ALmixer_PlaySourceTimed | ( | ALuint | al_source, |
ALmixer_Data * | almixer_data, | ||
ALint | number_of_loops, | ||
ALint | number_of_milliseconds | ||
) |
Play a sound on an OpenAL source with a time limit.
Plays a sound on an OpenAL source and will auto-stop after a specified number of milliseconds.
al_source | Allows you to specify the OpenAL source you want to play on. If you specify 0, an available source will be chosen automatically for you. |
almixer_data | The audio resource you want to play. |
number_of_loops | The number of times to loop (repeat) playing the data. 0 means the data will play exactly once without repeat. -1 means infinitely loop. |
number_of_milliseconds | The number of milliseconds that should be played until the sample is auto-stopped. -1 means don't auto-stop playing and let the sample finish playing normally (or if looping is set to infinite, the sample will never stop playing). |
ALint ALmixer_ResumeChannel | ( | ALint | which_channel | ) |
Resumes playback on a channel that is paused.
Resumes playback on a channel that is paused. Should have no effect on channels that aren't paused.
which_channel | The channel to resume or -1 to resume all channels. |
ALint ALmixer_ResumeSource | ( | ALuint | al_source | ) |
Resumes playback on a source that is paused.
Resumes playback on a source that is paused. Should have no effect on sources that aren't paused.
al_source | The source to resume or -1 to resume all sources. |
ALint ALmixer_RewindChannel | ( | ALint | which_channel | ) |
Rewinds the sound to the beginning that is playing on a specific channel.
If decoded all, rewind will instantly rewind it. Data is not affected, so it will start at the "Seek"'ed positiond. Streamed data will rewind the actual data, but the effect may not be noticed until the currently buffered data is played.
which_channel | The channel to rewind or -1 to rewind all channels. |
ALboolean ALmixer_RewindData | ( | ALmixer_Data * | almixer_data | ) |
Rewinds the sound to the beginning for a given data.
Rewinds the actual data, but the effect may not be noticed until the currently buffered data is played.
almixer_data | The data to rewind. |
ALint ALmixer_RewindSource | ( | ALuint | al_source | ) |
Rewinds the sound to the beginning that is playing on a specific source.
If decoded all, rewind will instantly rewind it. Data is not affected, so it will start at the "Seek"'ed positiond. Streamed data will rewind the actual data, but the effect may not be noticed until the currently buffered data is played.
al_source | The source to rewind or 0 to rewind all sources. |
ALint ALmixer_SeekChannel | ( | ALint | which_channel, |
ALuint | msec_pos | ||
) |
Seeks the sound to the beginning that is playing on a specific channel.
If decoded all, seek will instantly seek it. Data is not affected, so it will start at the "Seek"'ed positiond. Streamed data will seek the actual data, but the effect may not be noticed until the currently buffered data is played.
which_channel | The channel to seek or -1 to seek all channels. |
ALboolean ALmixer_SeekData | ( | ALmixer_Data * | almixer_data, |
ALuint | msec_pos | ||
) |
Seek the sound for a given data.
Seeks the actual data to the given millisecond. It may not be noticed until the currently buffered data is played.
almixer_data | The data to seek on. |
msec_pos | The time position to seek to in the audio in milliseconds. |
ALint ALmixer_SeekSource | ( | ALuint | al_source, |
ALuint | msec_pos | ||
) |
Seeks the sound to the beginning that is playing on a specific source.
If decoded all, seek will instantly seek it. Data is not affected, so it will start at the "Seek"'ed positiond. Streamed data will seek the actual data, but the effect may not be noticed until the currently buffered data is played.
al_source | The source to seek or 0 to seek all sources. |