CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2008
    Posts
    22

    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?

  2. #2
    Join Date
    Aug 2001
    Location
    Stockholm, Sweden
    Posts
    1,664

    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.

  3. #3
    Join Date
    Jan 2008
    Posts
    22

    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).

  4. #4
    Join Date
    Dec 2007
    Posts
    30

    Re: Audio over IP, Receiving audio UDP packets

    you can use RTP protocol.
    Best,
    Kevin Jo
    http://www.upredsun.com
    **Easily and automatically build tcp-based or udp-based network protocol source code**

  5. #5
    Join Date
    Jan 2008
    Posts
    22

    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?

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    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
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Jan 2008
    Posts
    22

    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?

  8. #8
    Join Date
    Dec 2007
    Posts
    30

    Re: Audio over IP, Receiving audio UDP packets

    I think RTP protocol meet your requirements!!
    Best,
    Kevin Jo
    http://www.upredsun.com
    **Easily and automatically build tcp-based or udp-based network protocol source code**

  9. #9
    Join Date
    Aug 2007
    Location
    Birmingham, UK
    Posts
    360

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured