audioutils: Add RTTTL parsing library#3477
Conversation
|
@ghnotgood Please add "Signed-off-by" to your commit. Also add a simple message to the Commit Body, e.g. |
|
@lupyuen I am sorry, I forget again. Thank you. |
cederom
left a comment
There was a problem hiding this comment.
Thank you @ghnotgood :-)
- How this solution is differenf from nuttx-apps/examples/audio_rttl [1]? Why do you prefer this particular application?
- Did you test this solution on a real world hardware? Does it generate tones as intended? Can you please provide testing logs?
- The code is a tiny C and H file. There is no need to git clone it from external repo. Please add sources directly into the PR. When there is a new release of the upstream we will update it here too. NuttX aims to be self-contained and have least possible amount of external dependencies.
Add a simple library for parsing Ring Tone Text Transfer Language (RTTTL). Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
84840fe
The example is an example. I am not sure how to use the example to play a sound I want in my application -- there is no API in header file. Moreover, it looks like The proposed library, on the other hand, lets a develop define how to make a sound, which may be generic NuttX audio driver or any hacked board-specific solution.
Yes, as stated in the Testing section of this PR. The build log is: Running the The
I did it, but now the check fails due to formatting issues. |
Summary
Add
rtttl-c, a simple parsing library, to theaudioutilsdirectory.Impact
Developers may implement a procedure that makes sound
and then play a sound encoded in the RTTTL string (
"..."in the following)Testing
The testing code is
with the output of
When instead of
print_tone, there is aplay_toneprocedure with the board-specific code to make the sound, the Jingle Bells song is played.