mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Add a simple library for parsing Ring Tone Text Transfer Language (RTTTL). Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
21 lines
415 B
Text
21 lines
415 B
Text
config AUDIOUTILS_RTTTL_C
|
|
bool "RTTTL parsing library"
|
|
default n
|
|
---help---
|
|
Simple library for parsing Ring Tone Text Transfer Language (RTTTL)
|
|
|
|
Define how to make a sound:
|
|
|
|
void
|
|
play_tone(struct rtttl_tone tone)
|
|
{
|
|
/* TODO: Make a sound with
|
|
* tone.frequency_100hz
|
|
* tone.period_us
|
|
* tone.duration_us
|
|
*/
|
|
}
|
|
|
|
and then play RTTTL string:
|
|
|
|
rtttl_play("...", play_tone);
|