Playback driver interface for the GAUDIO module.
◆ gaudio_play_lld_init()
gBool gaudio_play_lld_init |
( |
gU16 |
channel, |
|
|
gU32 |
frequency, |
|
|
ArrayDataFormat |
format |
|
) |
| |
Initialise the play driver.
- Returns
- gTrue if the channel, frequency and format are valid.
- Parameters
-
[in] | channel | The channel to use (see the driver for the available channels provided) |
[in] | frequency | The sample frequency to use |
[in] | format | The sample format |
- Note
- The driver will always have been stopped and de-init before this is called.
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gaudio_play_lld_set_volume()
gBool gaudio_play_lld_set_volume |
( |
gU8 |
vol | ) |
|
Set the output volume.
- Returns
- gTrue if successful.
- Parameters
-
[in] | vol | 0->255 (0 = muted) |
- Note
- Some drivers may not support this. They will return gFalse.
-
For stereo devices, both channels are set to the same volume.
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gaudio_play_lld_start()
void gaudio_play_lld_start |
( |
void |
| ) |
|
Start the audio output playing.
- Note
- This may be called at any stage including while the driver is already playing. The driver should check for data blocks to play using
gaudioPlayGetDataBlockI()
.
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gaudio_play_lld_stop()
void gaudio_play_lld_stop |
( |
void |
| ) |
|
Stop the audio output playing.
- Note
- Some drivers may only stop playing at a data block boundary.
-
It is possible but unlikely for it to be called when playing has already stopped.
-
It should not return until all active buffers (currently in use by the driver) have been returned to the free-list and
gaudioPlayDoneI()
has been called.
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gaudioPlayDoneI()
void gaudioPlayDoneI |
( |
void |
| ) |
|
Signal that all playing has now stopped.
- Note
- Defined in the high level GAUDIO code for use by the GAUDIO play drivers.
- Function Class: This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.
- Function Class: Not an API, this function is for internal use only.
◆ gaudioPlayGetDataBlockI()
Get a block of audio data to play.
- Returns
- A pointer to the GAaudioData structure or NULL if none is currently available
- Note
- Defined in the high level GAUDIO code for use by the GAUDIO play drivers.
- Function Class: This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.
- Function Class: Not an API, this function is for internal use only.
◆ gaudioPlayReleaseDataBlockI()
Release a block of audio data to the free list.
- Parameters
-
- Note
- Defined in the high level GAUDIO code for use by the GAUDIO play drivers.
- Function Class: This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.
- Function Class: Not an API, this function is for internal use only.