yjslash

Hi all,

I wrote the following question in other forum space but some MSFT guy told me to try this forum for my question. I hope I could get right answer as soon as possible here.

On Windows XP or earlier, I could capture the audio stream to the speacker not from the external device (maybe endpoint device in Vista) like the microphone. In other words, DirectSoundCapture was able to capture from the selected recording device/source line in the Windows record control utility or mixerXXX APIs. And if "Wave Out Mix" or "Stereo Mix" or something similar was selected as recording source line, DirectSoundCapture was able to record the audio stream to the speacker.

However, I could not find the way to do that in Windows Vista. Windows record control utility in Vista is just showing only external devices (endpoint devices) like mic., line-in or S/PDIF in but I could not find "Wave Out Mix" , "Stereo Mix" or something similar. I thought they were not seen because these kind of recording sources are NOT "endpoint device" on the user's point of view. So, I wrote a simple test code using "Device Topology API" of Core Audio APIs in Windows Vista SDK, in order to get internal controls of audio device. And one audio device driver (I have two Vista test system) exposes IAudioInputSelector interface. However, there's also NO "wave Out Mix" or similar subunit found.

Is there another way to capture the audio stream to the speacker on Vista Please let me know!!



Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

shyranis

This is an issue I have also experienced. It is excellent for keeping record of any goings-on on your personal or work computer for further study, but seems to be a feature that is lacking/outright missing in Windows Vista (Ultimate as well)



Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

Larry Osterman

What APIs did you use for this in XP They should continue to work on Vista.

WASAPI has a special Loopback mode that allows a client to capture the post-mix audio stream, that may help as well.





Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

yjslash

Thanks for your answer, Larry.

[What APIs did you use for this in XP They should continue to work on Vista.]

As I said in earlier post, I used "DirectSoundCapture" to capture that audio stream on the "source-line" selected in Windows record control utility. As you know, DirectSoundCapture buffer can capture the audio stream through the selected mixer line. For example, If "Mic-in" is selected, DirectSoundCapture buffer will capture the audio comes through Mic.-in line. And if "Line-in" is selected, it will capture the audio stream through Lini-in line. Yes, I know this should continue to work on Vista.

However, as the title of this thread saying, I could not find the way to record the audio stream on 'Wave' or 'Stereo Mix' line on Vista Actually, "Line-in" and "Mic-in" are real external "ENDPOINT devices" but 'Wave' or 'Stereo Mix' line are NOT.

Actually, on XP or earlier versino of Windows, I could select 'Wave' or 'Stereo Mix' line through ::mixerXXXX() APIs. For example, I used ::mixerGetLineInfo(...) API to get MIXERLINE structure. And if the "dwComponentType" member of MIXERLINE structure is MIXERLINE_COMPONENTTYPE_DST_WAVEIN, then I used ::mixerGetLineControls(...) API to get MIXERCONTROL structure. And if the "dwControlType" member of MIXERCONTROL structure is MIXERCONTROL_CONTROLTYPE_MUX, I could select the wanted record source line (i.e., 'Wave' or 'Stereo Mix') by using ::mixerGetControlDetails(...) or ::mixerSetControlDetails(...) APIs.

However, the above way using ::mixerXXX APIs makes empty record source line list on Vista. So, as I said, I wrote new code using "Device Topology API" and I could get IAudioInputSelector interface from Mux subunit part. However, this interface also did not give me a solution. IAudioInputSelector interface did not show 'Wave' or 'Stereo Mix' line but it shows only the endpoint devices.

Ok, to make a long story to short, the problem is... although DirectSoundCapture buffer can capture the audio stream through the selected record source line, there's no way to select 'Wave' or 'Stereo Mix' record source line which are not real external "endpoint devices" on Vista.

[WASAPI has a special Loopback mode that allows a client to capture the post-mix audio stream, that may help as well.]

Ok, I'll try writing new code using WASAPI as you said. However, before doing that, could you please confirm that I could capture the audio stream (PCM data) with this API, although there's no 'Wave' or 'Stereo Mix' line in the parts of Device Topologies (When I first re-wrote the code using 'Device Topology API' for selecting 'Wave' or 'Stereo Mix' record source line on Vista for myself, I though there's no need to change DirectSoundCapture code but I need change only the record line selection code for Vista. However, I failed as I explained. So, if I should use WASAPI instead using 'DirectSoundCapture'+'Device Topologies API', I'd like to get confirmation from you that WASAPI will really sort out my problem or not.)





Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

gourmete

Hi!
I was also searching for the stereo-mix for a VERY long time and finally found it. Right click on vistas sound-control-panel and select "show deactivated" You will see the stereo mix device appear. You can activate it, by right click-> activate.
I use directshow for audiocapture. After activating the stero-mix device I was able to receive it from the AudioCaptureDeviceEnum (or so) Method and was able to capture data the old fashioned way.




Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

PhillipBlanton

Sorry, but that is useless. There is no "show deactivated" on the sound-control-panel.

Can you please be more specific






Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

PhillipBlanton

OH! Found it.

For everyone else...

Right click on the speaker icon in the tray.

Select "Recording Devices"

In the resulting dialog, make sure you have the "Recording" tab selected and in the middle of the empty area, right click and select "Show Disabled Devices".

oooooop dere it is!






Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

Erin1433

That didn't work for me either.



Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

markm75

I'm having this same issue as well..

I want to be able to record the audio playing on the pc plus the microphone port.

I guess the only quick idea is to buy a mixer and put both inputs into it, then that into the line in on the pc.

In my case I have an asus P5n32sli se deluxe motherboard (AC97) ALC850 Realtek, with latest 6213 drivers for vista.

I also noticed the disabled stereo mix device.. but there was no way to activate it.





Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

Larry Osterman

Right now, you have two solutions.

First off, some audio vendors define a capture audio endpoint named something like "What You Hear". If you record from that capture device, you'll be recording what's normally output. This doesn't work for all vendors, however.

You can also open the render endpoint in "loopback" mode using the AUDCLNT_STREAMFLAGS_LOOPBACK, that will give you a capture stream that taps the audio stream before it goes to the device.





Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

markm75c

What did you mean by I could open the render endpoint (AUDCLNT_STREAMFLAGS_LOOPBACK).. Is this a registry key...

I'm using Audacity or Nero Trax to record.. frankly I cant get the Microphone audio to be loud enough over the stereo mix audio (when playing say a karaoke track in wincdg pro).. In fact, the karaoke track is far too loud.. lowering the volume on the stereo mix, then makes the microphone audio too low and vice versa..

Would this be a reg. key to change to do a more direct loop/recording

Thanks





Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

Larry Osterman

It's not a registry key, it's code that you'd have to write.

Unfortunately, the ability to do what you want is not exposed through any UI in Vista. If you want this functionality and it's not provided by your audio solution, you've got to rely on your application vendor (either Nero or Audacity) to provide this functionality. The good news is that Vista exposes this ability, previous versions of Windows did not directly support an application to recording the output of the audio engine, the bad news is that nothing currently takes advantage of this functionality :(





Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

markm75c

Well, short of writing my own code. I guess that leaves 2 options:

I could either send the audio that is coming out of my PC, back into the LineIn (possibly combined with the Microphone cable), but this would reduce the quality.

Perhaps my best bet is to find a standalone PCI card that will do the job.. My old Audigy used to work fine with the what you hear option in XP.. I no longer have it though.. Anyone have any recommendations on cards that work this way under Vista (with coax/optical out, hoping for coax and optical all on the same card, no daughter board/slot fillters needed)..

Thanks





Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

Larry Osterman

All the Creative cards I know of support the What You Hear endpoint, I don't know about others (I know that my older Realtek AC97 adapter on my machine does, for example).





Re: Vista Pro-Audio Application Development How to record from 'Wave' or 'Stereo Mix' in Vista?

markm75c

Larry Osterman wrote:

All the Creative cards I know of support the What You Hear endpoint, I don't know about others (I know that my older Realtek AC97 adapter on my machine does, for example).

I'm wondering if the creative ones still do in x64 Vista.. I'm assuming they would.

My motherboard is an Asus P5n32sli-se deluxe... it has an AC97 built in sound option, which is where I'm having the issues.. again.. it does let me record anything I play back, say mp3, wav, etc.. but mixing it with the Mic/Line In is hit or miss and sounds pretty bad in Vista.