Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

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.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 30th June 2004, 01:22 PM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 28
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.
  #2  
Old 30th June 2004, 01:36 PM
foolish Offline
Retired Community Manager
 
Join Date: Feb 2004
Location: Aalesund, Norway
Age: 27
Posts: 1,888
Excelent, thank you. This works great on my computer.
__________________
Sindre Pedersen Bjørdal || http://www.fedorasolved.org || Hardware Profile
- Please adhere to the FedoraForum Guidelines.
  #3  
Old 30th June 2004, 02:18 PM
djf_jeff Offline
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"
__________________
Jeff Saucier (djf_jeff)
Fedora profile
GPG : 0xA9E6E953
  #4  
Old 14th July 2004, 09:57 AM
Bana Offline
Retired Community Manager
 
Join Date: Feb 2004
Location: Austin, Texas
Age: 27
Posts: 581
Works for me, although does anyone know how to make Helixplayer (alsa realplayer) use the default alsa device?
__________________
http://coolhands.blogspot.com/
binarybana AT gmail.com
  #5  
Old 15th July 2004, 04:37 PM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 28
Posts: 7,909
Helixplayer alsa drivers are still being worked on as of a week ago, unfortunately.
  #6  
Old 15th July 2004, 08:30 PM
jzke
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?
  #7  
Old 16th July 2004, 02:27 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 28
Posts: 7,909
You may have to create the file:
Code:
touch /etc/asound.conf
  #8  
Old 20th August 2004, 11:59 AM
pigpen Offline
Registered User
 
Join Date: Nov 2003
Location: Regensburg, Germany
Age: 43
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:
Code:
#rate 44100
and it works perfectly now.
__________________
/(bb|[^b]{2})/ -- that is the question!
  #9  
Old 2nd November 2004, 07:30 PM
kennykongkl Offline
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.
  #10  
Old 6th December 2004, 02:03 PM
jgionet Offline
Registered User
 
Join Date: Nov 2004
Location: Ontario, Canada
Age: 38
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)
  #11  
Old 10th December 2004, 06:05 AM
brymaster Offline
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.
  #12  
Old 14th February 2005, 05:56 AM
rega451 Offline
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.
  #13  
Old 15th February 2005, 01:54 AM
gohanman Offline
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.
  #14  
Old 15th February 2005, 03:32 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 28
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.
  #15  
Old 15th February 2005, 04:19 AM
gohanman Offline
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.
Closed Thread

Tags
alsa, bug, mixing, program, software, sound

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Alsa sound problems on 64 bit caused by multiple alsa pulse audio plugins jinliew Hardware & Laptops 3 23rd June 2009 08:42 AM
Alsa sound will only play in one program with wine.... Kanaric Gamers' Lounge 9 9th May 2008 03:13 PM
Video mixing software blackarib Using Fedora 3 14th March 2006 06:02 AM
Mixing Simultaneous Sounds In Alsa rega451 Using Fedora 9 3rd March 2005 11:53 PM


Current GMT-time: 18:34 (Thursday, 23-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Prakhon Chai Photos - Pflugerville Travel Photos - Bagong Pagasa Travel Photos