2023-03-29 02:29 AM
This is the sample program I used.This is sounddb.s .When I DEBUG a variable, I find that these pointers point to the same address.I used two audio files. How do I have my program play the second audio file directly?I modified the userFunction as shown below.I set the breakpoint at the location shown below.
Observe the variables as shown in the figure below.
I already extern the Engine_start1What is the reason for this?
Solved! Go to Solution.
2023-04-03 03:08 AM
Thank you for your answer. I found the problem and solved it yesterday. The problem was with my first audio file. It ends with software information for recording audio. I recorded it using Adobe Audition. Is there any recommended audio software? Thank you for your help.
2023-03-30 07:55 AM
Hi WMa,
In the initWaveFile function the last line calls the function "checkWavFile".
This function, contained in the file sound.c., is in charge to fill the pointers to each WAV file
I hope this helps.
2023-03-30 08:21 AM
Thank you for your answer.I noticed this function. However, the values of sounddb[1].start and sounddb[0].start are the same during debugging. The correct sounddb[1].end value is not generated in this function.The whPtr parameter is still the first audio parameter.
2023-03-30 08:23 AM
The values for sounddb[1].start and sounddb[0].start are shown in the figure in my question.They're all 0x10000000.
2023-04-03 02:55 AM
Hi WMa,
I’ll check the procedure described in the UM, anyway here it is a workaround:
Step 1: Create one sounddb.s for each wave file ( see the image below)
Step 2: According to the compiler you are using, modify the file user_###.ld. adding the following code for each wave file you want load:
Step 3: In sound.c file, modify these functions: checkWavFile and initWaveFile as showed in the images below:
Step 4: In the main.c add one initWaveFile function for each wave files to play:
Step 5: modify the userFunction according to your needs.
I hope this helps.
2023-04-03 03:08 AM
Thank you for your answer. I found the problem and solved it yesterday. The problem was with my first audio file. It ends with software information for recording audio. I recorded it using Adobe Audition. Is there any recommended audio software? Thank you for your help.