Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Converting RTP Packets into wav format and writing to a wav file dynamically

$
0
0
Excellent article Mark. It took me a while to understand )).. A few questions after reading your article:

1) NAudio will only be able to convert raw stream into PCM for ACM codecs or the ones supported by Media Foundation right? If I have a custom codec installed on my machine will ACM/MF be able to convert from that custom format into PCM? Also, I found an alternate way of generating the WAV file using your code and playing it in media player for MuLaw format. I extracted the payloads from RTP packets and stored them directly into WAV file without converting them into PCM and created the WAV header with Mulaw format information instead of PCM. I am able to play that WAV file in media player. So I believe if the correct codec is installed Media Player will automatically create the PCM stream based on the codec info in header and play it for us. But again the question remains what will happen in case of custom codecs about which media player is unaware?

2) Also, I want to write my audio in stereo format to a WAV file. I saw your code but it seems that stereo format writing is supported by NAudio only for PCM streams. If I want to write the MuLaw payloads in stereo format to a WAV file is there a way to do it using NAudio?

Thanks,
Saleh

Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>