This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

playing stereo pcm audio data using sound driver sound.c on Dk-TM4C129X



I am using TM4C129x kit for my project. My requirement is to play a .wav file on Dk-TM4C129X dev platform.

I am using the sound driver sound.c present in the directory C:\ti\TivaWare_C_Series-2.0\examples\boards\dk-tm4c129x\drivers  as mentioned in the chapter 7 of SW-DK-TM4C129X-UG-2.0.pdf.

Using this driver i am able to play mono .wav files sampled at 8HZ, 16HZ, 32HZ and 64HZ. However i am not able to play stereo files and the audio file sampled at a rate different from the value mentioned earlier. It seems the current sound driver for the speaker does not support this.

Is there any new release of this driver files which support the stereo .wav files and support the others sampling frequencies like 11025 HZ and 44100 HZ ?

How can we play a stereo files and files having different sampling rate using this driver ?

  • I haven't heard anything in last two days on this issues. someone please respond to the query.

  • anjanish kumar said:
    I haven't heard anything in last two days on this issues.

     What issue? You are not able to do that so you don't understand WAV header and structure nor sampling rate....

     It is not clear what you need and none of us but TI emplyee are pay'd  to answer similar question. None of us is pay'd by you...

     

    anjanish kumar said:
    someone please respond to the query.

     Malformed due to poor English or just arrogance?

     Otherwise?

     Please can you learn just little legacy education?

  • Roberto Romano,

    I am so sorry, if you are hurt by my statement , although it was not my intention to hurt anybody.

    I am a beginner in audio but i do understand the WAV header. I just wanted to know if it is possible to play a stereo wave file using the driver sound.c. as the api SoundStart () do not accept the number of audio channels. In the driver source code it is clearly mentioned that the valid values of playback rate are are 8000, 16000, 32000, and 64000 HZ in that case what to do if the playback rate of a wave file is 11025 and 44100HZ ?

  •  Audio player is done from PWM driving a speaker thru low pass filter, is a generic application, if you need stereo version you must customize another channel of PWM output  to duplicate channel.

     After that if you understand HEader you can extract how raw data is stored in WAV files simply split the bytes/word of L/R [F/R/S] channel and set sampling rate sending the odd/even [0..n] bytes/word to proper PWM channel.

     It is so simple that is not necessary scream if none answer in a timely manner!

     Google Wave Header and you simply can find this INFO