Make two default playback devices. Outputting sound to different devices

Home / Breakdowns

It's no secret that sound cards, supporting the High Definition Audio standard, can not only determine which sockets devices are connected to, but also play/record multiple audio signal streams in parallel. It would be a sin not to use this functionality. Indeed, in our time, this can significantly increase the level of comfort when working with a computer.

Let's say we have speakers connected to the back panel and a headset connected to the front panel of the sound card. And we want the sounds of system events and players to be played through the speakers, and the sound from Skype to go through the headset. What benefits will this give us? When making a Skype call, you won't need to hastily connect your headset or turn off your speakers so that others won't hear your conversation.

Setting up in Windows 7

To do this we need to configure the sound card driver for independent signal processing from the front and rear panels. Follow these steps:

Click the button Start and select Control Panel :

In Control Panel, find your sound card manager. In our case it is Realtek Manager HD :

In the window that opens Realtek HD Manager click on the link Additional settings devices :

Select the playback device to play two different signals simultaneously. And the mode of separating all input jacks for the recording device. Click OK to save settings:

Now we need to configure the sound card so that all sounds default played through speakers. Click right click on the volume control icon near the system clock and select Playback devices:

The same window can be called up by accessing the button Start on Control Panel and clicking on the link Sound.

In the window Sound on the tab Playback, which will already be open, select the item in the list Speakers and press the button Default(namely the button itself, not the arrow to the right of it). With this action you will set Speakers as priority playback device, i.e. all sounds by default will come through the speakers. See picture:

Now select the item in the list Realtek HD Audio 2nd output(“secondary output”, i.e. front panel output) and press arrow next to the default button. From the drop down menu select Default communication device. Thus, you indicated that your system should use a headset for communication:

It should look like the picture below:

Now that the default playback device is set, click OK to close the window Sound.

In the window Settings select a section Sound settings. Here we need to select the microphone to be used:

  • as an active microphone: headset microphone connected to the front panel - Mic in at front panel (Pink):

  • as speakers: a headset connected again to the front panel - select the device from the list 2nd output:

Note. If you want, at point Call You can also choose a headset. But in this case, you may not hear the call if you move away from the computer.

It should look like the picture below. When everything is set up, click Save to apply the settings.

Now all sounds (music, video, system events and sounds from the browser) will be played through the speakers by default, and Skype conversations Always will go through the headset.

Similarly, you can output sound from any application to the desired device, regardless of which playback device you are using. at the moment selected by default. For example, for a DJ’s laptop at a disco, it is more logical to select the default audio output to the headset, and output only the audio from the AIMP player to the speakers. In this case, vacationers will not hear any sounds through the speakers except music.

Setting up in Windows XP

Double click on the Realtek icon in the taskbar to open the sound card manager (in our case RealtekHD Manager).

On the tab Mixer in the settings area playback click icon Settings:

Check the box Enable multi-stream playback.

Click OK to save parameters:

You will then be able to select your default playback device. Programs that do not have sound settings will output sound through it, as well as all applications that are configured to output sound to Primary sound driver:

In a similar way, recording of multiple streams is enabled.

Click the icon Settings in the area Record:

Check the box Enable multiple stream recording.

Click OK:

If I understand well, there are two questions here.

    Is it possible to play sound on two or more audio output devices at the same time and how to achieve this?

    Is it possible to loop the data through an audio input (recording) device so that it plays on the appropriate monitor, for example sent via a Skype audio stream to your partner in your respective case.

Reply to 1: This device is absolutely possible, but all of your system's independent audio outputs can play sounds simultaneously. For example, some professional audio interfaces (for music production) have 8, 16, 64 independent outputs, all of which can be played simultaneously. This means that each output device maintains its own buffer, which it consumes independently (apart from the parallelism in the final shared memory for supplying the buffer).

Most audio frameworks/systems provide functions that allow you to get a "device handle" in which you will need to pass a callback to feed the sample buffer (eg Open AL). This will be called independently and asynchronously by the framework/system (eventually the drivers sound devices). Since this all works asynchronously, you don't necessarily need multithreading. All you have to do basically is support two (or more) audio output devices, each using a separate callback to feed two (or more) separate devices.

Note You can also play multiple sounds on one device. Most devices/systems allow this kind of "resource sharing". In fact, this is one of the purposes for which sound cards are actually designed. Mix all the sounds created by different programs (and therefore take this heavy load off the CPU). When you use one (physical) device to play multiple sounds, the concept is the same as for multiple devices. For each sound you get a logical device handle. Only that these descriptors refer to multiple “channels” of a single physical device.

What should you use?

Open AL seems a bit like using heavy artillery for this simple task I would say (since you don't want What Lots of portability, and probably doesn't plan to implement its own codec and effects ;))

I would recommend you to use Qt here. It's very portable (Win/Mac/Linux) and it has a very handy class that will do the job for you: http://qt-project.org/doc/qt-5.0/qtmultimedia/qaudiooutput.html

Check out the example in the documentation to see how to play a WAV file, with a few lines of code. To play multiple WAV files at the same time, you just need to open multiple QAudioOutputs (basically, output the code from the example into a function and call it as often as you want). Please note that you need to close/stop QAudioOutput for the audio to stop playing.

Reply to 2: What you want to do is called loopback. Only a very limited number of sound cards, e.g. audio devices, provide a so-called loop input device, which allows recording of what is currently output by the main output combination of the sound card, e.g. However, even if such a device is provided, it will not allow you to push anything into the microphone input device. The microphone input device only accepts data from the microphone D/A converter. It's deep in H/W, you can't mix anything at your level.

It will be very hard (IMHO almost impossible) to have Skype send your default audio to your conversation partner. The only thing I can think of is to have an audio device with loopback capabilities (or just a physical cable connection to a possible line of monitors to any recording line) and then have Skype configured to use that device with feedback as input, However, Skype will not pick up from the microphone anymore, which means you won't have a conversation ;)

Note: When we say "simultaneous" playback here, we are talking about synchronizing the playback of two sounds as perceptually concerned in real time (in the range of 10-20 ms). We're not looking at actual sample-level synchronization and the associated jitter and phase shift issues that arise when transmitting audio to two physical devices with two independent (free running) clocks. Thus, when an application requires phase signal generation on independent devices, clock recovery mechanisms are needed, which can be provided by drivers or the OS.

Note: Software virtual audio device such as Virtual Audio Cable will provide virtual devices to provide loopback functionality on Windows. Environments like Jack Audio can be the same in a UX environment.

Computer users often ask how to output sound from a microphone to speakers or headphones. In this short article we will describe two ways how this can be done.

Method number 1. Sound settings in Windows.

In order to output sound from the microphone to or headphones, you must first open the sound settings. To do this, click right click mouse on the speaker icon on the taskbar and in the window that appears, select “Recording devices”.

After this, the “Sound” window will appear in front of you, open on the “Record” tab.

This window can also be opened through the “Control Panel”. To do this, you need to go to the “Hardware and Sound – Sound” section. And then, in the “Sound” window, open the “Recording” tab.

So, after you have opened the Sound window under the Recording tab, you need to go to the microphone properties. To do this, select your microphone with the mouse and click on the “Properties” button.

In the microphone properties, go to the “Listen” tab and turn on the “Listen with” function there. of this device" Enabling this feature will allow you to output audio from the microphone to your speakers or headphones.

In order to save, close all windows by clicking on the “Ok” button. In order to remove microphone sound from speakers or headphones, simply go to the microphone properties again and disable the “Listen from this device” function.

Method number 2. Sound card settings.

You can also output sound from the microphone to speakers or headphones using your settings. To do this, open the sound card settings and find the microphone settings there.

So, friends, as the title of the article suggests, it will describe how you can stream sound to two or more devices from one computer. This can be useful, for example, if you are a maniac, like me, and you suddenly need to watch a movie with sound output both on the HDMI monitor and on the computer speakers.

Linux

Working with sound on Linux can be an unbearable headache. Pulseaudio did an ambiguous job; on the one hand, it brought a lot of good things to the life of Linux, on the other hand, a lot of bad things. Of course, some things work better than before, other things have become more complex. Audio output processing is one of the challenges encountered.

So if you want to enable multiple audio outputs from your PC under Linux control, you can use a simple utility to include other audio devices in the virtual interface. Don't be alarmed, this is much easier to do than it seems from the description. The easiest way to enable audio playback from multiple sources is to use a simple graphical utility called "paprefs". This is short for PulseAudio Preferences.

In distributions based on Archlinux, install with the command:

Yaourt -S paprefs

In operating systems based on Ubuntu installation command:

Sudo apt install paprefs

If you use Fedora, God forbid, you will have to run two whole commands:

Su -c "yum install pulseaudio-module-zeroconf" su -c "yum install paprefs"

Well, if everything in your life has gone wrong and you use openSUSE, then to install in one click, click on this link, or enter these wonderful lines in the terminal one by one:

Zypper addrepo https://download.opensuse.org/repositories/openSUSE:Factory/standard/openSUSE:Factory.repo zypper refresh zypper install paprefs

I will assume that with the installation paprefs You've done it, let's proceed to directly merging the outputs. Even though the utility is graphical, it is probably easier to launch it by typing paprefs on the command line from regular user. If the phrase “ command line”, gives you the same feelings that I have the “Large Hadron Collider”, then find “PulseAudio Preferences” in your place and run it.
A window like this will open:

We need the last tab "Simultaneous Output"

As you can see from the screenshot, it is extremely difficult to make a mistake on this tab, since there is only one item that includes the functionality for which we are here. Check the box next to “Add virtual output device for simultaneous output on all sound cards”


Then open standard settings sound of your working environment, Gnome will be on the screenshots, this can also be achieved in a wonderful utility pavucontrol

In the sound settings, go to the “Output” tab with output devices and select “Simultaneous Output”.
Actually, that’s all, now your sound “flows” from all physical devices at the same time. I would immediately like to draw your attention to the fact that after enabling this function, you will only have one master volume control.

Windows

Although Windows 10, in my humble opinion, is a very worthy representative of the Microsoft family, I have not found a more appropriate way than using a trial utility written by Evgeny Muzychenko, which is quite capable of performing the functionality assigned to it. It may not be as easy and simple as it is done in Linux, but still. This utility is called Virtual Audio Cable, you can download it here. Those who do not have money and conscience can find it for free by name on rutracker.
We will assume that you have already stolen, bought the application and installed it on your computer, go to the menu Start > All Programs > Virtual Audio Cable > Audio Repeater (MME)

In the “wave in” field, select “Line1 (Virtual Audio Cable)”
In the “wave out” field, select one of the devices to which we want to send sound. In the picture below I have selected the TV.
In the priority field we set Realtime to eliminate audio delays.
Click “Start” and hear the sound from the selected device.


We minimize the window and launch another instance of “Audio Repeater (MME)”, in which we repeat the procedure, only we select another output device as Wave out, in my case it is an hdmi monitor.

The disadvantage of this method is that every time you turn on the computer you will need to perform a ritual to turn on the repeater.

Mac OS X


We must pay tribute to the Apple company, they have implemented this function perfectly, and what is called “out of the box”.
Open the built-in application Audio MIDI Setup, click on the plus sign at the bottom and create a device with several outputs as in the picture.

Organizing leisure time using a computer mainly consists of watching movies and TV series, listening to music and playing games. A PC can not only display content on its monitor or play music on its speakers, but also become a multimedia station with peripheral equipment connected to it, such as a TV or home theater. In such situations, the question of separating sound between different devices often arises. In this article we will look at ways to “divide” an audio signal.

There are two audio separation options. In the first case, we will receive a signal from one source and output it simultaneously to several audio devices. In the second, from different ones, for example, from a browser and a player, and each device will play its own content.

Method 1: Single audio source

This method is suitable in cases where you need to listen to the current audio track on several devices at once. This can be any speakers, headphones, etc. connected to the computer. The recommendations will work even if different sound cards are used - internal and external. To implement our plan, we will need a program called Virtual Audio Cable.

After installing the software, an additional audio device will appear in our system "Line 1".

  1. Open the folder with installed program at the address

    C:\Program Files\Virtual Audio Cable

    Finding the file audiorepeater.exe and launch it.

  2. In the repeater window that opens, select as input device "Line 1".

  3. We assign the output device to the device from which we plan to play sound, let it be computer speakers.

  4. Next, we need to create another repeater in the same way as the first one, that is, run the file audiorepeater.exe again. Here we also select "Line 1" for the incoming signal, and for playback we define another device, for example, a TV or headphones.

  5. Calling the line "Run" (Windows + R) and write the command

  6. On the tab "Playback" click on "Line 1" and make it the default device.

  7. We return to the repeaters and press the button in each window "Start". Now we can hear sound simultaneously in different speakers.

Method 2: Different sound sources

In this case we will output beep from two sources on different devices. As an example, let’s take a browser with music and a player on which we’ll play a movie. It will act as a player.

To perform this operation, we will also need special software - Audio Router, which is a standard mixer Windows volume, but with expanded functionality.

When downloading, please note that there are two versions on the page - for 32 and 64-bit systems.


This way we will get the desired result - the sound from VLC Media Player will be output to the TV, and the music from the browser will be broadcast to any other selected device - headphones or computer speakers. To return to standard settings, just select from the list "Default Audio Device". Do not forget that this procedure must be carried out twice, that is, for both signal sources.

Conclusion

“Distributing” sound to different devices is not such a difficult task if you get help with it special programs. If you often need to use more than just computer speakers for playback, then you should think about “registering” the software in question in your PC on an ongoing basis.

© 2024 ermake.ru -- About PC repair - Information portal