none
Audio Player App. <--> ASIO driver <--> UDP Packets

    Question

  •  

    I am currently working with Audio over IP and wanted to develop an interface that would take uncompressed audio data (PCM) from a UDP packet and send it to the ASIO driver which would be able to talk to any audio player application which supports ASIO.

     

    I'm not exactly sure where to start, but I was told that Media Foundation Development would do what I wanted.

     

    Can anyone point me in the right direction?

    Wednesday, January 23, 2008 7:40 PM

Answers

  • I'm pretty new to Media Foundation myself, but I don't think it's the right tool here.  I think MF could help you decode a stream from a URL, but it sounds like your UDP packets contain a proprietary protocol that wouldn't be directly decoded by any MS API's.

     

    Next, if you're using ASIO (is that a requirement?) Media Foundation probably isn't the right tool here either.  ASIO is a 3rd party (Steinberg?) audio streaming API that talks more directly to the sound card (via the sound card's mfr's own ASIO drivers) than the old DirectX / DirectShow / Windows API's.  I've never heard of it being used as an audio source from anything other than audio hardware.  But, it seems like what you would need is to write an ASIO driver that makes your UDP stream appear like a sound card input to an ASIO host application.

     

    The only applications that really support ASIO tend to be pro / semi-pro mixing systems (Cubase of course, Ableton Live, Pro tools).  These aren't really audio player applications, in my view.  Windows Media Player, for instance, would not play through ASIO.

     

    If, however, what you're trying to do is play a UDP stream over a sound card with low / fixed latency, then perhaps you can cut ASIO out of the equation and just use Media Foundation or perhaps the Core Audio API's directly.

     

     

    Friday, January 25, 2008 12:00 AM

All replies

  • I'm pretty new to Media Foundation myself, but I don't think it's the right tool here.  I think MF could help you decode a stream from a URL, but it sounds like your UDP packets contain a proprietary protocol that wouldn't be directly decoded by any MS API's.

     

    Next, if you're using ASIO (is that a requirement?) Media Foundation probably isn't the right tool here either.  ASIO is a 3rd party (Steinberg?) audio streaming API that talks more directly to the sound card (via the sound card's mfr's own ASIO drivers) than the old DirectX / DirectShow / Windows API's.  I've never heard of it being used as an audio source from anything other than audio hardware.  But, it seems like what you would need is to write an ASIO driver that makes your UDP stream appear like a sound card input to an ASIO host application.

     

    The only applications that really support ASIO tend to be pro / semi-pro mixing systems (Cubase of course, Ableton Live, Pro tools).  These aren't really audio player applications, in my view.  Windows Media Player, for instance, would not play through ASIO.

     

    If, however, what you're trying to do is play a UDP stream over a sound card with low / fixed latency, then perhaps you can cut ASIO out of the equation and just use Media Foundation or perhaps the Core Audio API's directly.

     

     

    Friday, January 25, 2008 12:00 AM
  •  Jeffclar wrote:

    I'm pretty new to Media Foundation myself, but I don't think it's the right tool here.  I think MF could help you decode a stream from a URL, but it sounds like your UDP packets contain a proprietary protocol that wouldn't be directly decoded by any MS API's.

     

    Next, if you're using ASIO (is that a requirement?) Media Foundation probably isn't the right tool here either.  ASIO is a 3rd party (Steinberg?) audio streaming API that talks more directly to the sound card (via the sound card's mfr's own ASIO drivers) than the old DirectX / DirectShow / Windows API's.  I've never heard of it being used as an audio source from anything other than audio hardware.  But, it seems like what you would need is to write an ASIO driver that makes your UDP stream appear like a sound card input to an ASIO host application.

     

    The only applications that really support ASIO tend to be pro / semi-pro mixing systems (Cubase of course, Ableton Live, Pro tools).  These aren't really audio player applications, in my view.  Windows Media Player, for instance, would not play through ASIO.

     

    If, however, what you're trying to do is play a UDP stream over a sound card with low / fixed latency, then perhaps you can cut ASIO out of the equation and just use Media Foundation or perhaps the Core Audio API's directly.

     

     




    Thanks for the reply. Very useful information.

    Using ASIO is actually a requirement because I want to record/create tracks from the audio stream using pro / semi-pro audio software. As you mentioned, one of the ways to do this is to write an ASIO driver that makes the UDP stream appear to be a sound card input. I think that's what I need to do in order to get any audio software that supports ASIO to input sound from UDP packets.

    I thought the Core Audio API's had higher latency over ASIO? What about Media Foundation compared with ASIO?

    If Media Foundation provides lower latency as well as being able to interface with pro / semi-pro audio software, so that it can be seen as input, then that would probably be the best way to go. But I'm not very familiar with Media Foundation and its capabilities yet so I'm not sure if it is possible.


    Friday, January 25, 2008 7:47 PM
  • I suggest checking out the pro-audio forums.

     

    http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=351&SiteID=1

     

    I did a search for "latency" and found a couple of interesting threads.  They're pretty old, and it seems that very low latency is possible with the Core Audio APIs.  I don't know if the major DAW systems have been updated for Vista.  They may work on DirectX, but it appears that the DirectX latency performance in Vista is actually much worse than it was on XP due to the translation layer that enables it.

     

    My application depends on fixed latency (not just low latency) .  I'm hoping that Media Foundation will inherit the latency capabilities provided by the Core Audio APIs, but failing that, I'll use the Core Audio API's directly, and failing that, I'll drop back to <ugh> ASIO / XP.

    Friday, January 25, 2008 10:01 PM