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

30th June 2004, 01:22 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909

|
|
|
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; 10th August 2004 at 07:34 PM.
|

30th June 2004, 01:36 PM
|
 |
Retired Community Manager
|
|
Join Date: Feb 2004
Location: Aalesund, Norway
Age: 26
Posts: 1,888

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

30th June 2004, 02:18 PM
|
 |
Registered User
|
|
Join Date: Mar 2004
Location: Quebec
Posts: 78

|
|
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"
|

14th July 2004, 09:57 AM
|
 |
Retired Community Manager
|
|
Join Date: Feb 2004
Location: Austin, Texas
Age: 26
Posts: 581

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

15th July 2004, 04:37 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909

|
|
|
|

15th July 2004, 08:30 PM
|
|
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?
|

16th July 2004, 02:27 AM
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909

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

20th August 2004, 11:59 AM
|
 |
Registered User
|
|
Join Date: Nov 2003
Location: Regensburg, Germany
Age: 42
Posts: 447

|
|
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!
|

2nd November 2004, 07:30 PM
|
|
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.
|

6th December 2004, 02:03 PM
|
 |
Registered User
|
|
Join Date: Nov 2004
Location: Ontario, Canada
Age: 37
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)
|

10th December 2004, 06:05 AM
|
|
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.
|

14th February 2005, 05:56 AM
|
 |
Registered User
|
|
Join Date: Jan 2005
Posts: 317

|
|
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.
|

15th February 2005, 01:54 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 37

|
|
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.
|

15th February 2005, 03:32 AM
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909

|
|
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.
|

15th February 2005, 04:19 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 37

|
|
|
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
|
|
|
Current GMT-time: 05:18 (Thursday, 20-06-2013)
|
|
 |
 |
 |
 |
|
|