Larry Osterman's WebLog

Confessions of an Old Fogey
Blog - Title

What's up with Audio in Windows Vista?

What's up with Audio in Windows Vista?

  • Comments 43

Steve Ball (the GPM for the MediaTech group (of which Windows Audio is a part)) discussed some of these changes in the Windows Audio Channel 9 video, but I'd like to spend a bit more time talking about what we've done.

A lot of what I'm discussing is on the video, but what the heck - I've got a blog, and I need to have some content to fill in the white space, so...

 

The Windows audio system debuted in Windows 3.1 with the "Multimedia Extensions for Windows", or MME APIs.  Originally, only one application at a time could play audio, that was because the original infrastructure didn't have support for tracking or mixing audio streams (this is also why the old audio apps like sndrec32 pop up an error indicating that another device is using the audio hardware when they encounter any error).

When Windows 95 (and NT 3.1) came out, the MME APIs were stretched to 32 bits, but the basic infrastructure didn't change - only one application could play audio at one time.

For Windows 98, we deployed an entirely new audio architecture, based on the Windows Driver Model, or WDM.  As a part of that architectural change, we added the ability to mix audio streams - finally you could have multiple applications rendering audio at the same time.

There have been numerous changes to the audio stack over the years, but the core audio architecture has remained the same until Vista.

Over the years, we've realized that there three major problem areas with the existing audio infrastructure:

  1. The amount of code that runs in the kernel (coupled with buggy device drivers) causes the audio stack to be one of the leading causes of Windows reliability problems.
  2. It's also become clear that while the audio quality in Windows is just fine for normal users, pro-audio enthusiasts are less than happy with the native audio infrastructure.  We've made a bunch of changes to the infrastructure to support pro-audio apps, but those were mostly focused around providing mechanisms for those apps to bypass the audio infrastructure.
  3. We've also come to realize that the tools for troubleshootingaudio problems aren't the greatest - it's just too hard to figure out what's going on, and the UI (much of which comes from Windows 3.1) is flat-out too old to be useful.

Back in 2002, we decided to make a big bet on Audio for Vista and we committed to fixing all three of the problems listed above.

The first (and biggest) change we made was to move the entire audio stack out of the kernel and into user mode.  Pre-Vista, the audio stack lived in a bunch of different kernel mode device drivers, including sysaudio.sys, kmixer.sys, wdmaud.sys, redbook.sys, etc.  In Vista and beyond, the only kernel mode drivers for audio are the actual audio drivers (and portcls.sys, the high level audio port driver).

The second major change we made was a totally revamped UI for audio.  Sndvol32 and mmsys.cpl were completely rewritten (from scratch) to include new, higher quality visuals, and to focus on the common tasks that users actually need to do.  All the old functionality is still there, but for the most part, it's been buried deep below the UI.

The infrastructure items I mentioned above are present in Vista Beta1, unfortunately the UI improvements won't be seen by non Microsoft people until Vista Beta2.

  • Larry,

    Thanks for the sharing the info, good one. I will update my blog later with this info.

    I found an interesting issue with Real Player on the BETA1 of vista. Here is what happens:

    Lets say I am playing 2-3 songs in the real player, and during the song play, even when I reduce the volume by clicking on the volumn button from the taskbar, and when the player goes to next song, the volumn goes back to default one, which it picks during the load.

    I dont see this issue in 2003 or XP, but only happens on Vista.

    Any idea ? or any way I can tweak this ? I have a video captured for this, and will post this later once am back to home from office
  • "one of the leading causes of Windows reliability problems" - tell me about it. I had to return about 90% of audio cards I bought because the drivers simply would not work for more than few minutes of playing audio on a multiple cpu system (and I mean multiple CPU, not just HT). Mixing multiple sources when you can actually have multiple requests coming in at literally the same time proved to be beyond most hardware manufacturers' skill. The only card that worked reliably for me was an old AWE32 running Microsoft's drivers but I can't use that anymore as my current mobo does not have an ISA slot. I'm currently using a card based on VIA's Envy24-HF chip with VIA's drivers, it doesn't sound as good as some other cards but at least it does not crash my box.
  • Larry,

    On the "pro audio"-side, are there any changes that make it "easier" for applications to bypass things like kmixer and achieve real bit-perfect digital output of digital content?

    Presently, there are workarounds required - ASIO, kernel streaming, etc.

    Thanks,
    Mark
  • Mark, I'll be talking about the changes for pro audio in a bit.
  • Thanks for explaining this with all of us. My girlfriend is really going to like the possibility to turn down all those noisy Windows Sound, still being able to listen to Music. I hope the technology will make soon make it in a CTP build, unfortnatly it’s missing / turned of in 5219.

    It’s also great to discover these days, trough Blogs and channel9 video’s that Microsoft is very ambitious about Vista.
  • "UI improvements won't be seen by non Microsoft people until Vista Beta2"...

    But you could post some screen shots in your blog, I assume :) :) :)
  • Larry,

    Are codecs are involved here? I mean...bad codecs are one of the typical "windows problem"...how are codecs involved in all this? Thats what you meant about "the leading causes of Windows reliability problems"? Are there some docs with a high-level overview of the whole audio subsystem (Sound is one of those things that nobody cares about because "it always works" and I've certainly not found anything about it ;)
  • I invite you to check out http://www.opensound.com/virtmix.html - Open Sound System (OSS) for UNIX (& Linux) does per-application volume control, per-application vu-metering and ossxmix and /dev/sndstat shows what app is running on which channel. We had these features this back in 2001 :) -

    On top of it we have an RIAA-curve equalizer (yes the very same evil RIAA did some interesting research back in the 60s and 70s), fidelity enhance (similar to SRS-WoW) and stereo image enhance. I don't know Vista doesn't give you a system wide equalizer.

    BTW, 4Front isn't just a UNIX shop, we do Windows and Mac OSX plugins as well (www.oss3d.com) - hope to exchange ideas with you guys sometime - glad to actually see who the Windows audio guys are!.

    I got to say Vista is looking pretty impressive . Good work!



    Regards
    Dev Mazumdar
    4Front Technologies
    dev@opensound.com
  • Larry,

    all this is sooo welcomed, i'm a pro-audio guy, and i was looking for info on Vista audio for years, no one answered my questions. Maybe you will:-)

    As i'm reading that you are going to post more info relating these things, the only question of mine is: are there going to be anything like ASIO built in windows? low latency (ultra-low) input-output stuff?

    Only one more...i'm REALLY REALLY curious: are there ANY changes to MIDI???? for example better MIDI timing?

    thank you guys for your work in this department, windows needed these changes so much!!!

    steamy
  • > The first (and biggest) change we made was
    > to move the entire audio stack out of the
    > kernel and into user mode.

    Um, that's interesting. Are you still on speaking terms with a certain famous company who once moved the entire video stack out of user mode and into the kernel?

    Monday, September 19, 2005 3:06 PM by Jerry Pisk
    > The only card that worked reliably for me
    > was an old AWE32 running Microsoft's drivers
    > but I can't use that anymore as my current
    > mobo does not have an ISA slot.

    Plus your next OS (Vista) won't support an ISA slot even if your mobo has one.
  • Did it occur to anyone at Microsoft that the reason that audio/streaming drivers are so buggy is the *complete* lack of usable documentation? The audio/streaming documentation in the DDK is without peer in terms of how poor it is. A little bit of effort put into the documentation could have radically cut down on the number of buggy device drivers.
  • Don't get me started on the dual CPU/audio crash problems.

    MS has received MANY crash reports from my machine for that problem.

    grrrrrrrrrr
  • Thanks for explaining this with all of us. My girlfriend is really going to like the possibility to turn down all those noisy Windows Sound, still being able to listen to Music. I hope the technology will make soon make it in a CTP build, unfortnatly it’s missing / turned of in 5219.

    It’s also great to discover these days, trough Blogs and channel9 video’s that Microsoft is very ambitious about Vista.
  • elpiojo, most of the audio infrastructure is there, but the UI that makes it all work isn't :(

    It's in the mainline Windows depot currently, so...

    Steamy, we're not doing a lot with MIDI in Vista, unfortunately :(

    And I'll talk a bit about the low latency stuff later on.
  • Just curious, if you rewrote some of your stuff from scratch did you code any of it managed? What are the guidelines (if any) when working within the operating system with regards to using the framework?

    Regards
    Lee
Page 1 of 3 (43 items) 123