VuoAudio implementation.
Definition in file VuoAudioFile.c.
Go to the source code of this file.
Classes | |
struct | VuoAudioFileInternal |
Context data for decoding an audio file. More... | |
Typedefs | |
typedef struct VuoAudioFileInternal * | VuoAudioFileInternal |
Context data for decoding an audio file. More... | |
Functions | |
static void | VuoAudioFile_decodeChannels (VuoAudioFileInternal afi) |
Decodes a sample buffer for each channel, and fires the trigger port. More... | |
void | VuoAudioFile_free (void *af) |
Deallocates the audio file decoder. More... | |
VuoAudioFile | VuoAudioFile_make (VuoText url) |
Creates a new audio file decoder, and starts a decoding timer. More... | |
bool | VuoAudioFile_getInfo (VuoText url, VuoReal *duration, VuoInteger *channelCount, VuoReal *sampleRate) |
Returns information about the specified audio file. More... | |
void | VuoAudioFile_enableTriggers (VuoAudioFile af, void(*decodedChannels)(VuoList_VuoAudioSamples), void(*finishedPlayback)(void)) |
Specifies a trigger callback to invoke when a new audio sample buffer is ready for playback. More... | |
void | VuoAudioFile_disableTriggers (VuoAudioFile af) |
When this function returns, the trigger callback will no longer be called. More... | |
void | VuoAudioFile_setLoopType (VuoAudioFile af, VuoLoopType loop) |
Sets the behavior upon reaching the end of the audio file. More... | |
void | VuoAudioFile_setTime (VuoAudioFile af, VuoReal time) |
Seeks the playhead to the specified time in the audio file. More... | |
void | VuoAudioFile_play (VuoAudioFile af) |
Starts or resumes playback of the audio file from the current playhead time. More... | |
void | VuoAudioFile_pause (VuoAudioFile af) |
Pauses playback of the audio file, leaving the playhead at its current time. More... | |
bool | VuoAudioFile_isPlaying (VuoAudioFile af) |
Returns true if the audio file is currently playing. More... | |
typedef struct VuoAudioFileInternal * VuoAudioFileInternal |
Context data for decoding an audio file.
|
static |
Decodes a sample buffer for each channel, and fires the trigger port.
<
Definition at line 67 of file VuoAudioFile.c.
void VuoAudioFile_disableTriggers | ( | VuoAudioFile | af | ) |
When this function returns, the trigger callback will no longer be called.
Does not change playback status.
Definition at line 391 of file VuoAudioFile.c.
void VuoAudioFile_enableTriggers | ( | VuoAudioFile | af, |
void(*)(VuoList_VuoAudioSamples) | decodedChannels, | ||
void(*)(void) | finishedPlayback | ||
) |
Specifies a trigger callback to invoke when a new audio sample buffer is ready for playback.
Does not change playback status.
Definition at line 375 of file VuoAudioFile.c.
void VuoAudioFile_free | ( | void * | af | ) |
Deallocates the audio file decoder.
Definition at line 176 of file VuoAudioFile.c.
bool VuoAudioFile_getInfo | ( | VuoText | url, |
VuoReal * | duration, | ||
VuoInteger * | channelCount, | ||
VuoReal * | sampleRate | ||
) |
Returns information about the specified audio file.
Returns true
on success, false
if the file couldn't be read.
Definition at line 354 of file VuoAudioFile.c.
bool VuoAudioFile_isPlaying | ( | VuoAudioFile | af | ) |
Returns true
if the audio file is currently playing.
This is independent of whether a trigger callback is currently active.
Definition at line 462 of file VuoAudioFile.c.
VuoAudioFile VuoAudioFile_make | ( | VuoText | url | ) |
Creates a new audio file decoder, and starts a decoding timer.
<
<
Definition at line 204 of file VuoAudioFile.c.
void VuoAudioFile_pause | ( | VuoAudioFile | af | ) |
Pauses playback of the audio file, leaving the playhead at its current time.
Definition at line 449 of file VuoAudioFile.c.
void VuoAudioFile_play | ( | VuoAudioFile | af | ) |
Starts or resumes playback of the audio file from the current playhead time.
Definition at line 438 of file VuoAudioFile.c.
void VuoAudioFile_setLoopType | ( | VuoAudioFile | af, |
VuoLoopType | loop | ||
) |
Sets the behavior upon reaching the end of the audio file.
Definition at line 405 of file VuoAudioFile.c.
void VuoAudioFile_setTime | ( | VuoAudioFile | af, |
VuoReal | time | ||
) |
Seeks the playhead to the specified time in the audio file.
Definition at line 416 of file VuoAudioFile.c.