Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Issues Regarding the Audio player example
-
I have created an audio player based on the "audio_player_objf" example wich appears to work but fails to play actual noise. To further debug this issue i copied the "audio_player_objf" example code and config into my own project file. This produced the same result, no noise from the 3.5mm jack but otherwise expected running order.
The only difference between the two programs is their respected location with my own project being located in the "spresense/sdk/apps/examples" folder. Does the location of the program matter or is there a spesific config i have missed?
-
@Jolle The location should not matter. I assume you used the Workspace setup wizard in VS Code or similar for the command line to get the setup correctly.
If you suspect the config, then you should diff the generated config.h files of each build.Some examples have additional configuration defined in a Kconfig file in the example folder. You might want to check if these configuration items cause a difference. (You wrote you copied the code, no mention about other files)
-
@jens6151-0-1-1 The entire file structure is equal to the example, with only the Kconfig, Make.defs and Makefile altered in order to comply with the different name of the program.
I am unfamiliar with the "workspace setup wizard" you are referring to.
The configuration i have done is through the "config.py" tool and is identical to the example.The thing that confuses me is that the program works similar to the example (same timing, same prints) but without producing sound to the 3.5mm jack.
If the location does not matter, why are there two different example folders?
I have already had to make shortcuts from the "spresense/sdk/modules/include" folder to "spresense/nuttx/include" as the compiler otherwise fails to locate the audio libraries. This would indicate a difference between the two example folders and as such making the location of the actual program crucial. -
@jens6151-0-1-1 After further testing the location of the program is not the issue, both example folders produce the same results.
-
Hey, @Jolle
Is the problem solved or are you still experiencing unexpected behavior?
-
@CamilaSouza Yes the problem is still persistent, sadly.
-
@Jolle
And just to check.. when you ran the audio_player_objf example as it was it produced sound normally?I'll make my own app with same code as original to see if it works normally on my side.
-
Hi @Jolle !
So I did the same thing as you did and I created a new example just like audio_player_objf.
I did exactly like you and altered the Kconfig, Make.defs and Makefile in order to comply with the different name of the program. And I got the same result! The program would run, but no sound would come out!
After some investigating I realized that in the main code file (.cxx ) there are some references to the program name as well!
So I went in and replaced all the instances of EXAMPLES_AUDIO_PLAYER_OBJIF with the new program name.
After that the sound come outSo what I would recommend is open the whole app folder in an editor and look for all instances of EXAMPLES_AUDIO_PLAYER_OBJIF. Replace those with your own application name and you're good to go.
Let me know if even after this example still doesn't work and we can investigate further!
-
@CamilaSouza Yes thank you!