Ubuntu sound card exclusive solution

Source: Internet
Author: User
Tags gstreamer

Http://wiki.ubuntu.org.cn/problem solving solution: software_mixing

A much better way of getting ESD to work with non-ESD-aware apps is to make ALSA use its software mixer.
Enable ALSA to use its own software mixer to work together with applications that are not recognized by ESD.

$ Sudo/etc/init. d/ALSA-utils stop $ sudo gedit/var/lib/ALSA/asound. State
(Add the following text verbatim to the start of this file)

$ Sudo/etc/init. d/ALSA-utils start

# This text shoshould be added to the beginning
#/Var/lib/ALSA/asound. state. You only need to add
# It once -- it is saved processing SS reboots.
PCM. asymed {
Type asym
Playback. PCM dmix
Capture. PCM dsnoop
}
PCM. Default {
Type plug
Slave. PCM asymed
}
PCM. dmix {
Type dmix
Ipc_key 5678293
Ipc_key_add_uid Yes
Slave {
PCM 'hw: 0, 0'
Period_time 0
Period_size 128
Buffer_size 2048
Format s16_le
Rate 48000
}
}
PCM. dsnoop {
Type dsnoop
Ipc_key 5778293
Ipc_key_add_uid Yes
Slave {
PCM 'hw: 0, 0'
Period_time 0
Period_size 128
Buffer_size 2048
Format s16_le
Rate 48000
}
}

Now as your programs as you want can all use the sound card simultaneously, both the output and the microphone! ESD-aware apps can use ESD, other apps will still work fine.
Now, you can make all the software you want use the sound card at the same time, whether it is output or microphone! Applications recognized by ESD can use ESD, and other applications can work normally.

One notable misfeature of ESD is that it often ruins the/V sync when playing videos. after setting up the software mixer, you might find it useful to turn ESD off altogether (in tThe sound control panel uncheck "enable software mixing "). now, especially with gstreamer 0.10, your movies shoshould have perfect A/V sync.
An obvious bad feature of ESD is that it damages the synchronization of audio and video when playing a video. after setting the software mixer, you may find it helpful to disable ESD (select "enable software mixing" in the audio control panel '). now, especially in gstreamer 0.10, no audio or video synchronization occurs in your movie. it's a shame that software mixing isn' t enabled on Ubuntu by default. software mixing is not enabled in the Ubuntu preset.

 

The setting does not take effect immediately .. I also forgot how to set it.
But only the following is changed, as shown in...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.