Audio over IP, Receiving audio UDP packets
I am trying to create a program that will extract uncompressed audio (data) from UDP packets for audio playback. I'm not exactly sure where to begin.
Would I need to create custom drivers for this or is it possible to access the ethernet port directly using C++? Any good tutorials/resources for this type of application?
Re: Audio over IP, Receiving audio UDP packets
What kind of uncompressed audio is it? (you need to know number of samples, channels etc)... make sure it is PCM data
Use waveOutOpen with the WAVEFORMATEX and format tag WAVE_FORMAT_PCM
You need to know exactly how the application protocol works (or do you implement the sending end as well?) in order to receive and play/save the audio correctly.
You can use plain socket programming for this, no need for kernel development.
Re: Audio over IP, Receiving audio UDP packets
Thanks for the reply.
Yes, I'm using PCM uncompressed audio.
For now I just want my application to read then play the audio (no need to send or save).
Re: Audio over IP, Receiving audio UDP packets
you can use RTP protocol.
Re: Audio over IP, Receiving audio UDP packets
"you can use RTP protocol." - upredsun
I'm not really familiar with RTP protocol. How does it compare in terms of speed/delay/latency, advantage, convenience to UDP?
Re: Audio over IP, Receiving audio UDP packets
Well, it works with audio and video, if that means anything...
http://en.wikipedia.org/wiki/Real-ti...sport_Protocol
Re: Audio over IP, Receiving audio UDP packets
I was talking to someone about this and they mentioned that instead of creating an application that plays this audio, I can try passing the uncompressed PCM data from the UDP packet to an ASIO driver (interface) and that interface will be able to talk to any application which supports ASIO.
So when using the ethernet port for audio over IP any audio playback application will be able to see the ethernet port as a soundcard?
Audio playback application <--> ASIO driver <--> winsock <--> tcp/ip layers <--> network card
Is this possible?
Re: Audio over IP, Receiving audio UDP packets
I think RTP protocol meet your requirements!!
Re: Audio over IP, Receiving audio UDP packets
Quote:
Originally Posted by peripheral99
Is this possible?
Yes, but please note that only software supporting ASIO will be able to use your "virtual soundcard". Other software (like windows media player) does not use the ASIO interface and will not "see" your software.