fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
Loading...
Searching...
No Matches
audio.h File Reference

Audio system interface. More...

#include <stdbool.h>
Include dependency graph for audio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void Audio_exit (void)
 Exits the audio system and frees all resources. This function should be called before the program exits, or when the audio system is no longer needed. This function is safe to call even if the audio system has not been initialized.
 
bool Audio_isPlaying (void)
 Checks the playback status of the audio system.
 
int Audio_play (const char *fp)
 Attempts to play the audio file at the given file path. This function initializes the audio system if it has not been initialized yet. If the audio system is already playing audio, the current audio playback is stopped before the new audio file is played.
 

Detailed Description

Audio system interface.

Function Documentation

◆ Audio_exit()

void Audio_exit ( void )

Exits the audio system and frees all resources. This function should be called before the program exits, or when the audio system is no longer needed. This function is safe to call even if the audio system has not been initialized.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Audio_isPlaying()

bool Audio_isPlaying ( void )

Checks the playback status of the audio system.

Returns
true if the audio system is playing audio, false otherwise (e.g. the audio system has completed playback or failed to start playback)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Audio_play()

int Audio_play ( const char * fp)

Attempts to play the audio file at the given file path. This function initializes the audio system if it has not been initialized yet. If the audio system is already playing audio, the current audio playback is stopped before the new audio file is played.

Parameters
fpthe file path of the audio file to play
Returns
0 on success, a negative error code on failure
Here is the call graph for this function:
Here is the caller graph for this function: