audio: Audio Functions

Top  Previous  Next

The Audio API is used to control the routing and volume of the audio nodes and devices.

The audio nodes represent the endpoints for the audio, e.g. the speaker, line-out and microphone jacks on an audio device.

 

There are two ways of connecting audio to the audio jacks:

gsmHeadset can be used to route the audio between the nodes and the GSM modem.

voiceSetChannel can be used to route the voice output to the nodes. The table below shows the available nodes on the channels.

 

Available audio nodes:

Node

Name

Channel

Muted by default

0

Microphone

1

No

1

Line-out

1

No

2

Speaker

1

Yes

 

 

 

The following audio functions are available:

 

audioSetVolume

Controls the volume level of an audio node.

audioGetVolume

Retrieves the volume level from an audio node.

audioRoute

Controls the routing between audio devices.