 |
 |
 |
 |
| Guides & Solutions (No Questions) Post your guides here. You can also add your comments to a guide, but don't start a thread to ask a question. Use another forum for that. |

2004-06-30, 06:22 AM CDT
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Minnesota, USA
Age: 23
Posts: 7,902

|
|
|
ALSA software mixing (one program sound only bug)
Try playing multiple sounds at once. Chances are it won't work, and you will only hear one. One program gets exclusive access to the sound device.
The solution is software mixing. ALSA sound makes this possible, but you have to enable it. Put this in your /etc/asound.conf file:
Code:
pcm.!default {
type plug
slave.pcm "swmixer"
}
pcm.swmixer {
type dmix
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
}
This should enable software mixing on the default device. (You can also just test this out on your user by putting it in your ~/.asoundrc file.) Now just get your programs to use the default ALSA device. (This isn't as easy as it sounds.) In XMMS just edit the configuration of the ALSA output plugin.
Or you could install and configure a sound mixing server like esd or KDE's arts. The goal is to mix the sound before outputting it.
Edit: If I recall correctly, I got this from this ALSA howto. It's just here for your convenience.
Last edited by Jman; 2004-08-10 at 12:34 PM CDT.
|

2004-06-30, 06:36 AM CDT
|
 |
Retired Community Manager
|
|
Join Date: Feb 2004
Location: Aalesund, Norway
Age: 23
Posts: 1,890

|
|
|
Excelent, thank you. This works great on my computer.
|

2004-06-30, 07:18 AM CDT
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Quebec
Age: 27
Posts: 77

|
|
Work fine here, here is my asound.conf :
Code:
#
# DMIX input device
#
pcm.!output {
type dmix
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 48000
}
}
#
# DSNOOP output device
#
pcm.!input {
type dsnoop
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
rate 48000
}
}
#
# ASYM duplex device
#
pcm.!duplex {
type asym
playback.pcm "output"
capture.pcm "input"
}
#
# Make the duplex device default
#
pcm.!default {
type plug
slave.pcm "duplex"
}
#
# OSS Compability
#
pcm.!dsp0 {
type plug
slave.pcm "duplex"
}
ctl.!mixer0 {
type hw
card 0
}
One guy at job found this and it work fine. If you have trouble after that with gstreamer, just run this as your user :
Code:
gconftool-2 -s /system/gstreamer/0.8/default/audiosink -t string "alsasink device=output"
__________________
Jeff Saucier
|

2004-07-14, 02:57 AM CDT
|
 |
Retired Community Manager
|
|
Join Date: Feb 2004
Location: Austin, Texas
Age: 22
Posts: 580

|
|
|
Works for me, although does anyone know how to make Helixplayer (alsa realplayer) use the default alsa device?
|

2004-07-15, 09:37 AM CDT
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Minnesota, USA
Age: 23
Posts: 7,902

|
|
|
|

2004-07-15, 01:30 PM CDT
|
|
Guest
|
|
Posts: n/a

|
|
|
Doesn't work for me, for some reason I don't have a asound.conf file in /etc/... I have asound.state anyone no why?
|

2004-07-15, 07:27 PM CDT
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Minnesota, USA
Age: 23
Posts: 7,902

|
|
You may have to create the file:
Code:
touch /etc/asound.conf
|

2004-08-20, 04:59 AM CDT
|
 |
Registered User
|
|
Join Date: Nov 2003
Location: Regensburg, Germany
Age: 38
Posts: 446

|
|
Just a note: Jman's .asoundrc worked on my VIA KT133 sound hardware at home.
The box at my office has
Card: Intel 82801BA-ICH2
Analog Devices AD1885
hardware, which has a fixed sampling rate of 48kHz (i guess  ), so I just commented out the
"rate"-line like this: and it works perfectly now.
__________________
/(bb|[^b]{2})/ -- that is the question!
|

2004-11-02, 12:30 PM CST
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 8

|
|
|
Hi Jman,
I tried your steps. It worked well with xmms playing and when I play a wav file using aplay.
However, if I have xmms playing music and yahoo messenger running, it doesn't work very well. Only when I stop playing music on xmms, will the yahoo sounds appear after that. Yahoo seems to wait for xmms to stop playing, then yahoo will play its backlog of sounds. It's like they can't share the same output channel.
My asound.conf file is the same as what you have here.
My settings in the xmms player for the ALSA output plugin is as follows :
ALSA 1.2.10 output plugin [libALSA.so]
Device Settings - Audio device = default, Mixer = Mixer Card 0, Mixer Device = PCM
Advanced Settings - Buffer time = 500 ms, Period time = 50 ms, Mmap mode = checked
Truly appreciate your help, thanks in advance.
|

2004-12-06, 07:03 AM CST
|
 |
Registered User
|
|
Join Date: Nov 2004
Location: Ontario, Canada
Age: 33
Posts: 194

|
|
|
I think this is the "#1 thing" that annoys me the most about using Linux as a Multimedia workstation. I'm trying "very hard" to switch permantly from XP to FC3 however all these multimedia issues are forcing me to boot up my XP PC all the time. I do alot of Sound Mixing, CD/DVD burning/creations, Video playing/editing and MiniDV encoding with my Digital Camcorder. You would think having the ability to play multiple sounds/wavs/mp3/anything would be simpler than this. Even Windows has had this for years. (sorry.. just venting a little.. it's Monday)
|

2004-12-09, 11:05 PM CST
|
|
Registered User
|
|
Join Date: May 2004
Location: Kalamazoo, MI
Posts: 6

|
|
|
This problem in Fedora with ALSA has bugged me for quite a while. I really do hope they can put some effort into fixing this.
|

2005-02-13, 10:56 PM CST
|
 |
Registered User
|
|
Join Date: Jan 2005
Posts: 312

|
|
Quote:
|
Originally Posted by Jman
Try playing multiple sounds at once. Chances are it won't work, and you will only hear one. One program gets exclusive access to the sound device.
The solution is software mixing. ALSA sound makes this possible, but you have to enable it. Put this in your /etc/asound.conf file: -----------
|
Big problem for me here! I also wanted to do this but for some reason I don't have an asound.conf  I have asound.state, but that's it. Since I haven't had any reason (or so I thought) to look for it before this, I didn't know it wasn't there, or even should be there for that matter.
|

2005-02-14, 06:54 PM CST
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 32

|
|
Quote:
|
Originally Posted by Jman
Edit: If I recall correctly, I got this from this ALSA howto. It's just here for your convenience.
|
Apologies for bumping an ancient thread, but I'm having some trouble getting this working.
With the given additions to /etc/asound.conf, I can play two different files at once using asound, which is good.
Unforntantely, I still can't get sound from real applications (e.g., xmms, xine) at the same time. Worse, the configuration dialogs don't have the settings that the linked guide CLAIMS they have.
Specifically, xmms (v. 1.2.10) does not have a check box labeled "user defined".
Xine (v. 0.99.2) does not have a field called "device used for mono output" nor does it have a field called "device used for stereo output" in the "audio" tab.
Any advice on how to *actually* configure these programs to use swmixer would be great.
|

2005-02-14, 08:32 PM CST
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Minnesota, USA
Age: 23
Posts: 7,902

|
|
Quote:
|
Originally Posted by gohanman
Apologies for bumping an ancient thread, but I'm having some trouble getting this working.
With the given additions to /etc/asound.conf, I can play two different files at once using asound, which is good.
Unforntantely, I still can't get sound from real applications (e.g., xmms, xine) at the same time. Worse, the configuration dialogs don't have the settings that the linked guide CLAIMS they have.
Specifically, xmms (v. 1.2.10) does not have a check box labeled "user defined".
Xine (v. 0.99.2) does not have a field called "device used for mono output" nor does it have a field called "device used for stereo output" in the "audio" tab.
Any advice on how to *actually* configure these programs to use swmixer would be great.
|
This guide was based on FC2, if I recall correctly. XMMS should have an alsa output option, be sure that is selected. If there is a box for the device enter swmixer, if not it might work anyway.
Try editing the xine config file like it suggests.
|

2005-02-14, 09:19 PM CST
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 32

|
|
|
1. I'm running FC2, so that really shouldn't be the problem.
2. xmms does have an alsa output option, which is selected. If I change "Audio Device" to swmixer, it gives me an error along the lines of "device is busy or misconfigured" when I try to play. The way it is right now, xmms and aplay won't run at the same time, so I don't think xmms is using the software mixer.
3. I did look at the xine config file, it doesn't have the keys for mono device and stereo device either.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Automatic Translations (Powered by  ):
All times are GMT -7. The time now is 07:43 PM CST.
|
|
 |
 |
 |
 |
|
|