matiamic commented on issue #18354: URL: https://github.com/apache/nuttx/issues/18354#issuecomment-5178949757
@blue-debug Yibo Fang, thank you for the kind response. I tested your changes and the playback is fixed. Addition of the tone functionality is very useful for debugging, because you can rule out problems with audio format decoding. However, in the current form in https://github.com/blue-debug/nuttx-apps/commit/51750e75f the tone functionality doesn't work for me - due to problems with audio format decoding:). The reason is that the `pcm_decode` attempts to interpret the raw samples of the first buffer as a WAV header and of course fails to do so. Currently I don't see a runtime workaround for this, because `pcm_decode` seems to be switched between RAW and WAV using `CONFIG_AUDIO_FORMAT_RAW`. I believe this issue also prohibits raw playback from `nxplayer` (when the config option is not set (but then again normal playback wouldn't work)). The command works for valid WAV data, but I think it would not work with raw PCM data at this moment (`pcm_decode` would try to interpret the samples as WAV header). Another issue I see is that when this happens (`tone` is invoked and nothing happens). It causes the `nxplayer_playthread` to exit and the player state is probably not handled properly, because on invoking `quit` or other `tone` or `play` command, the app goes into deadlock. One last detail that comes to mind is that the `playraw` misses the proper command help (args not listed). It would be nice if you considered adding that with your changes. Best regards Michal -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
