Audio glitch for multiple channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi I finally decided to post here to see if anybody can help me. I have
written an audio decoder application that streams audio packets from a file
(mostly mp3s), decodes and renders via ALSA. I setup the alsa hw in
interleaved mode, 2 channel (mp3 has two channels of audio), submit decoded
frames while keeping the buffer optimal in a play thread. But what I hear is
destorted audio, like the sound coming from an old cassette player when its
playing and you hit the fast forward button. However when I convert the mp3
into one channel with ffmpeg, everything plays fine, sound comes out from
two speakers. 

I am not sure if I understand what's going on. Since I set the device in
interleaved mode and I am providing the channel data as they are embedded
inside the file, do I need to do anything additional? I am using ffmpeg
streming APIs, I dont know if a particular channels data has to be sent to a
particular channel, besides, how would I do that? I am using snd_pcm_writei,
and there is no channel destination in the API. BTW the data is packed in 16
bits boundary. 

if anybody have any clue, please let me know. 

Thanks

Ratin


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux