

This would play on your system’s default speaker.Īlso, note that there may be problem in just playing any audio.wav file because of the mismatched audio format etc support. You may play the recorded audio as follows: $ aplay recorded.wav Note that providing the sample format, channel count, frame rate in recording ensures that playback picks up the same settings – this is because there is no real hardware underneath it is just a virtual loopback connection.Īnd in parallel (from another shell) play an audio from audio.wav into hw:2,0,4: $ aplay -D hw:2,0,4 audio.wavĪnd you’d find that recorded audio contains the played one – a loopback in action. Start recording audio from hw:2,1,4: $ arecord -D hw:2,1,4 -f S16_LE -c 2 -r 48000 recorded.wav A simple experiment could demonstrate the same. For example, audio played back into hw:2,0,4 could be captured from hw:2,1,4 audio played back into hw:2,1,7 could be captured from hw:2,0,7 – these are what are the loopbacks. Now in this, whatever audio is played back into hw:2,0,s could be captured from hw:2,1,s and viceversa, s ranging from 0 to 7. Moreover, each of the two devices under it, has 8 subdevices, which would be accessed using the format hw:c,d,s, where c stands for card number, d for device number, and s for subdevice number, e.g.
Audio loopback free#
It may vary depending on which is the next free available card number.

If you mute the external speakers, "WASAPI loopback" capture and "analog mixer" capture will work, but "hardware loopback" capture won't work.In the above images, the card 2 is the loopback card. If you mute the audio endpoint, and there is a mute control in the driver, only "WASAPI loopback" capture will work.
Audio loopback driver#
I infer that your audio driver must have a mute control, because loopbback recording is working for you. If you mute the audio endpoint, and there is no mute control in the driver, none of the loopback recording methods will work. If you mute the app, none of the looback recording methods will work. If the ENDPOINT_HARDWARE_SUPPORT_MUTEįlag is set, there's a mute control in the driver.
Audio loopback download#
To tell whether an audio driver exposes a mute control for a particular endpoint, you can download KSStudio (included in the Windows Driver Kit) and look at the topology, or you can call IAudioEndpointVolume::QueryHardwareSupport. M4) On your external speakers or amplifier, turn the volume all the way down. Windows sets the mute control in the driver (but continues to process unmutedĪudio, including handing it down to the driver.) M3) Mute audio endpoint (in the Sound control panel or in the volume control flyout or in the left half of the volume mixer) on an audio driver that implements a mute control. (I believe it's CAudioVolume) into the audio pipeline, and hands silence to the driver. Windows injects a muting "audio processing object" M2) Mute audio endpoint (in the Sound control panel or in the volume control flyout or in the left half of the volume mixer) on an audio driver that does not implement a mute control. M1) Mute the app (either with the UI in the app or in the right half of the Volume Mixer.) This stops the audio data from going to the Windows audio engine. Now let's talk about the four ways to do muting. This involves getting an audio cable, plugging one end in the "line out" or headphone jack, and the other end in the "line in" or microphone jack, and then recording from the "line in" or microphone. R2) "Analog mixer" capture (Stereo Mix, What You Hear, etc.) This pulls the audio data from the sound card after it's gone through the driver but before it goes out the speaker or jack. R1) "WASAPI loopback" capture (Windows Vista and later only.) This pulls the audio data from the Windows audio engine just before it's passed down to the driver. Let's talk about the three ways to do loopback recording. Is it possible to capture sound even if sound is muted in Windows XP? If ( mixerSetControlDetails((HMIXEROBJ)hmixer, &mxcd, MIXER_SETCONTROLDETAILSF_VALUE) = MMSYSERR_NOERROR ) If ( mixerGetLineControls((HMIXEROBJ)hmixer,&mxlc, MIXER_GETLINECONTROLSF_ONEBYTYPE) = MMSYSERR_NOERROR ) Mxlc.dwControlType = MIXERCONTROL_CONTROLTYPE_MUTE If ( mixerGetLineInfo((HMIXEROBJ)hmixer, &mxl, MIXER_GETLINEINFOF_COMPONENTTYPE) = MMSYSERR_NOERROR ) Mxl.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS If ( mixerOpen(&hmixer, 0, 0, 0, 0) = MMSYSERR_NOERROR ) I found that this seems not work in Windows XP (I use "Stereo Mix" and waveInXX).Ģ. This is great that I can play sound and record it without disturbing the people near my notebook. I found if I press mute hot-key my loopback capture application still can capture sound from endpoint.
Audio loopback movie#
I play a movie with Windows media player and run my program. I wrote a program with WASAPI loopback capture interface to record what I hear in Windows 7.
