µGFX  2.9
version 2.9
Driver Playback

Detailed Description

Playback driver interface for the GAUDIO module.

Functions

GDataBuffergaudioPlayGetDataBlockI (void)
 Get a block of audio data to play. More...
 
void gaudioPlayReleaseDataBlockI (GDataBuffer *paud)
 Release a block of audio data to the free list. More...
 
void gaudioPlayDoneI (void)
 Signal that all playing has now stopped. More...
 
gBool gaudio_play_lld_init (gU16 channel, gU32 frequency, ArrayDataFormat format)
 Initialise the play driver. More...
 
void gaudio_play_lld_start (void)
 Start the audio output playing. More...
 
void gaudio_play_lld_stop (void)
 Stop the audio output playing. More...
 
gBool gaudio_play_lld_set_volume (gU8 vol)
 Set the output volume. More...
 

Function Documentation

◆ 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]channelThe channel to use (see the driver for the available channels provided)
[in]frequencyThe sample frequency to use
[in]formatThe 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]vol0->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()

GDataBuffer* gaudioPlayGetDataBlockI ( void  )

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()

void gaudioPlayReleaseDataBlockI ( GDataBuffer paud)

Release a block of audio data to the free list.

Parameters
[in]paudThe GDataBuffer block to be released.
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.