Audio#

The hardware abstraction layer only supports a minimal audio interface. It is only possible to play a single short tone. Any platform that wants to support audio should implement this function.

Functions#

Functions

void audioTone(uint32_t frequency)#

Plays a tone.

Each hardware platform that supports playing audio should implement this method to play a short tone of a given frequency. This is the only supported audio playback. Configuration for a “silent mode” is not covered by this function and should be checked by the caller.

Parameters
  • frequency[in] the frequency of the note to play in mHz

void audioShutter(void)#

Make a sound similar to a camera shutter.

This is used when taking a snapshot to give an audio clue that the snapshot has been taken. Configuration for a “silent mode” is not covered by this function and should be checked by the caller.

Example#

To play the note C with frequency 277.183Hz, you would call

audioTone(277183);

Note that frequencies are in mHz.