none
Audio in Windows 8

    Question

  • What is new in audio for Windows 8? I came across this document: http://msdn.microsoft.com/en-us/library/windows/hardware/br259116 which says hardware accelerated audio/hardware offloading is returning to Windows 8 but it would require new Port Class (PortCls) WaveRT-based drivers. Is there backward compatibility or changes to make the DirectSound API hardware accelerated again if you have PortCls WaveRT drivers? I didn't see any PDC session on audio acceleration. Also, there are some issues related in audio in Windows 7 which need to be addressed:

    1. You cannot output audio simultaneously to multiple audio devices/endpoints. For example, if I have my PC in my bedroom but another set of connected speakers in the living room, I can only play audio on either one of the speakers at a time. In Windows XP, I could send audio simultaneously to both set of speakers.

    2. Built-in input monitoring for line-in. This seems to be device-specific whereas in XP, it worked for all audio devices. When I plug in something to my line in and audio is playing on the connected device, I want to be able to hear it without starting recording.

    3. Several small issues with the volume mixer. I know that in Vista and Windows 7, the full volume mixer by design doesn't open on double click because the main volume has to be shown immediately on single click. But why not have the best of both worlds? Just re-arrange the "Mixer" link so when you single click, the "Mixer" link appears exactly under the mouse cursor. That way, a single click would open it right away, but a double click would also open the mixer. Another problem with the mixer window is it doesn't save its position and size. And it cannot be minimized. Please fix this. And the mixer balance or per-channel volume is stupidly hidden deep inside the Sound control panel, it should be in Volume mixer!!

    4. There is no way to select a different MIDI soft synth other than the default system-supplied "Microsoft GS Wavetable" synth licensed from Roland which doesn't sound great. If I install my own MIDI softsynth or have a sound card which has hardware-based MIDI synth, I want to be able to switch to it from the Sounds control panel. The ability to select the MIDI synth was removed in Vista and is one of the blocking issues for me. For MIDI-related work, I therefore still use a Windows XP-based system.


    • Edited by xpclient Saturday, May 26, 2012 9:33 AM
    Monday, September 26, 2011 4:28 AM

Answers

All replies

  • For 2. This feature "Listen to" is availabe on Windows 7. Is that what you are looking for?

    Tuesday, October 25, 2011 5:52 AM
  • Yes I know #2 is available on Windows 7 for some devices through the "Listen to this device" option however:
    -  There's far too much latency for "Listen to this device" so the audio it plays is very much delayed. MS needs to optimize it so there's zero delay. In comparison, if the device manufacturer used a hardware loopback, it was real-time.
    -  The problem is with the device manufacturer's drivers. Many drivers of HD audio-based chips don't expose a "Line in" endpoint on the Recording tab, so I am unable to listen to anything plugged into the "Line in" port. (The two HD audio codecs I have from Conexant and IDT don't have "Line in", only "Microphone in", although I know that there's a "Line in" jack for these machines).
    • Edited by xpclient Tuesday, October 25, 2011 7:02 AM
    Tuesday, October 25, 2011 7:01 AM
  • Have you considered restoring to the inbox HD Audio Class driver? Do you get separate endpoints for that now?
    Wednesday, October 26, 2011 3:47 PM
  • I tried first with the in-box HD Audio driver, then tried the driver from Windows Update.
    Wednesday, October 26, 2011 3:56 PM
  • What's Windows is the device logo'd for? Given the inbox driver did not expose the line in as you described, this seems to be a pin config issue with the device. The inbox driver simply expose the device topology as exposed by the pin config, and it's been told there is only the mic-in, no line-in.
    Wednesday, November 02, 2011 6:13 AM
  • Any chance of an answer on the OP's first question?
    1. You cannot output audio simultaneously to multiple audio devices/endpoints. For example, if I have my PC in my bedroom but another set of connected speakers in the living room, I can only play audio on either one of the speakers at a time. In Windows XP, I could send audio simultaneously to both set of speakers.
    In my case, I want to output HDMI to the main zone of my 5.1 setup (in the living room) and analog to zone 2 (in the dining room) and I'm tired of having to get into Control Panel to change the default output device every time I want to switch.
    Jim

    Friday, May 25, 2012 8:01 PM
  • Unfortunately the feature you are describing (which we refer to internally as "broadcast mode") has never been part of Windows.

    In XP it worked because the driver looked like one device, and it would do its own stream redirection after Windows handed the audio to it.

    There are two potential workarounds but both would involve third-party code.

    One workaround at the driver level is to install a virtual audio driver like Virtual Audio Cable.  Make this the default device.  Add virtual audio cables from the virtual audio device to the two real audio devices.

    Another workaround at the app level is to have the app open streams to both audio devices simultaneously.


    Matthew van Eerde

    Friday, May 25, 2012 9:10 PM
  • Can the app do that in Windows Vista/7/8? It has the ability to open streams to both audio devices simultaneously? Can it do so in exclusive mode?
    Saturday, May 26, 2012 3:24 AM
  • Sure.


    Matthew van Eerde

    Saturday, May 26, 2012 3:37 AM
  • How and can you point me to some correct MSDN documentation? :)
    Saturday, May 26, 2012 5:28 AM
  • If the app in question is using Media Foundation it can create two instantiations of the Streaming Audio Renderer.  On one instantiation, set the MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID attribute on the SAR to the WASAPI endpoint ID of the first device; on the other media session, set the attribute to the ID of the second device.  See WASAPI below.

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms701557(v=vs.85).aspx

    If the app is using DirectShow, the various audio devices enumerate directly as filters in CLSID_AudioRendererCategory.

    http://msdn.microsoft.com/en-us/library/windows/desktop/dd375464(v=vs.85).aspx

    http://blogs.msdn.com/b/matthew_van_eerde/archive/2010/12/18/10014843.aspx

    If the app is using DirectSound, it calls DirectSoundCreate8, specifying the GUID for a different device each time.

    http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.reference.directsoundcreate8(v=vs.85).aspx

    If the app is using WinMM, it calls waveOutGetNumDevs, waveOutGetDevCaps on each device to see which two it wants, and waveOutOpen with the relevant IDs. 

    http://msdn.microsoft.com/en-us/library/ms713505(v=vs.85).aspx

    If the app is using WASAPI, it calls IMMDeviceEnumerator::EnumAudioEndpoints to get the two IMMDevices it's interested in, then activates an IAudoClient off of each device.

    http://msdn.microsoft.com/en-us/library/windows/desktop/dd371400(v=vs.85).aspx


    Matthew van Eerde

    • Marked as answer by xpclient Saturday, May 26, 2012 9:22 AM
    Saturday, May 26, 2012 6:49 AM
  • What about jack sensing - how to disable the behavior which mutes the speakers as soon as I plug headphones in. What if I want audio to play through both the speakers as well as headphones? Or another set of speakers I plug into the line out jack? The behavior on XP was driver-dependent, dunno about Vista/7/8 - most often the speakers get muted.


    • Edited by xpclient Saturday, May 26, 2012 7:45 AM
    Saturday, May 26, 2012 7:44 AM
  • The speakers don't get muted.  The default device just changes from the speakers to the headphones.  You can verify this by plugging in your headphones and configuring (say) Windows Media Player to always play to the speakers rather than following the default device:

    Windows Media Player | Tools | Options | Devices | Speakers | Properties | Select the audio device

    Change from "Default Audio Device" to "Speakers".

    Windows does not provide a way for a user to play all audio through both speakers and headphones.  An individual app can elect to play audio through multiple devices as outlined above; a power user can install a virtual audio driver solution like Virtual Audio Cable as outlined above.


    Matthew van Eerde

    Saturday, May 26, 2012 7:55 AM
  • Windows does not provide a way for a user to play all audio through both speakers and headphones. 

    That's my question:  will that change in Windows 8?  It's a huge nuisance to have to get into control panel and change the default audio device when all I want to do is switch from listening to music in the living room to the dining room.

    Jim

    Saturday, May 26, 2012 2:41 PM
  • Okay I wrote a sample/test app that streams to either Speakers using WinMM+to headphones using DirectSound or to speakers using WinMM+ to HDMI out using WASAPI. Problem is the timing of audio is very different so the audio doesn't play exactly at the same time. How to solve this? I don't want to introduce any delays or offsets and want it to play synchronized. It was so simple under XP!! There was no latency for any of the redirected streams.

    Another source of frustration is drivers. With the inbox Windows 7 drivers, my device outputs show as Speakers and Headphones (not plugged in) and when I plug in the headphones it switches the default device (headphones). But with drivers offered on Windows Update, headphones are not shown as an output/endpoint at all! Instead I get only Speakers and HDMI out. Headphones when plugged still shows the "Speakers" as the default device with a green check mark, but the speakers get muted out, and without "headphones" appearing as a separate endpoint, I can't stream at app level to them.


    • Edited by xpclient Sunday, May 27, 2012 3:42 AM
    Saturday, May 26, 2012 7:18 PM
  • @jim97219 will that change in Windows 8?

    Nope, the situation in Windows 8 is the same here as it was for Windows 7, Windows Vista, Windows XP etc.

    @xpclient: you can use IAudioClient::GetStreamLatency and IAudioClock::GetPosition to get an idea of where each stream is and adjust the starting time of each stream.  On Windows 7 you can use IAudioClockAdjustment to fix long-term skew.


    Matthew van Eerde

    Tuesday, May 29, 2012 4:12 PM
  • I found a set of drivers for my HD Audio chip that outputs simultaneously from speakers and headphones and also shows the SPDIF/HDMI out as another endpoint. No more head-banging or compromises to get simple things done. Another issue resolved from hundreds in XP to 7 migration.
    Tuesday, May 29, 2012 5:26 PM
  • Maurits,

    Thanks for the answer.  It sure would be nice if someone at Microsoft would fix this.  It's really a nuisance.

    XPClient,

    What chip do you have?  Where did you find the driver?

    Jim


    • Edited by jim97219 Tuesday, May 29, 2012 7:20 PM
    Tuesday, May 29, 2012 7:19 PM
  • @Jim97219, I have Conexant, Realtek and IDT-based chips on different PCs of which I have found multi-output drivers for Conexant and Realtek. I found the drivers through some searching, don't remember exactly which site.
    • Edited by xpclient Wednesday, May 30, 2012 7:48 AM
    Wednesday, May 30, 2012 7:47 AM
  • I found the solution here

    http://oasis.byethost15.com/?p=5138


    • Proposed as answer by LuongGem Monday, August 27, 2012 8:11 AM
    • Unproposed as answer by LuongGem Monday, August 27, 2012 8:11 AM
    • Proposed as answer by Neo2962Banned Wednesday, September 26, 2012 9:17 AM
    • Unproposed as answer by xpclient Wednesday, September 26, 2012 11:31 AM
    • Edited by Thomoz Friday, September 28, 2012 11:50 AM
    Wednesday, May 30, 2012 4:38 PM