Database updates are currently taking place!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
acer audio boot bsod computer connection crash dell display driver drivers dvd error firefox freeze google hard disk hard drive hardware hijackthis install internet keyboard laptop linksys macro malware network outlook outlook 2003 outlook 2007 problem ram recovery redirect server slow trojan upgrade usb video virus vista windows windows 7 windows 7 64 bit windows vista windows xp wireless youtube
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Multiple audio applications?

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
-Bender-'s Avatar
Member with 50 posts.
 
Join Date: May 2004
Location: A Small Town in Canada
26-Feb-2005, 04:25 AM #1
Multiple audio applications?
hello, ive been using slack 10 and a 2.4.xx kernel for a bit now and it has came to my attention that i can't have two application both using my audio device(ac97 on boad sound using the alsa module) simontaneously. I can only have one application using it at a time. Anyone know how to fix this cause it would be nice to listening to music and play a game that needs to use audio.
Thanks Benny,
short101's Avatar
Senior Member with 108 posts.
 
Join Date: Dec 2003
Location: Oz
26-Feb-2005, 05:33 AM #2
Look at jack. There is another plugin that I cant remember at the moment. Basically lets you share the card between two apps.
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
26-Feb-2005, 01:33 PM #3
create a dmix that you use to take the input from multiple sources and combine them into one stream.

for example my .asoundrc

Code:
pcm.dmixer {
        type dmix
        ipc_key 1024
        slave {
                pcm "hw:0,0"
                period_time 0
                period_size 1024
                buffer_size 8192
        rate 44100
        }

        bindings {
                0 0
                1 1
        }
}

pcm.dsp {
        type plug
        slave.pcm "dmixer"
}

ctl.mixer0 {
        type hw
        card 0
}
-Bender-'s Avatar
Member with 50 posts.
 
Join Date: May 2004
Location: A Small Town in Canada
27-Feb-2005, 02:09 AM #4
Thanks for the replys, i put this is my ~/.asoundrc
Code:
pcm.ossmix {
    type dmix
    ipc_key 1024          # must be unique!
    slave {
        pcm "hw:0,0"      # you cannot use a "plug" device here, darn.
        period_time 0
        period_size 1024  # must be power of 2
        buffer_size 8192  # dito. It
        #format "S32_LE"
        #periods 128      # dito.
        #rate 8000        # with rate 8000 you *will* hear, 
                          # if ossmix is used :)
    }

# bindings are cool. This says, that only the first
# two channels are to be used by dmix, which is enough for
# (most) oss apps and also lets multichannel chios work 
# much faster:

    bindings {
        0 0   # from 0 => to 0
        1 1   # from 1 => to 1
    }
}
pcm.dsp0 {
    type plug
    slave.pcm "ossmix"     # use our new PCM here
}
# mixer0 like above
ctl.mixer0 {
    type hw
    card 0
}
but it still wont let me have two applications use the audio device at the same time, i know it will work if i set this up correctly tho, because i can have two instantes of alsaplayer going at the same time if i tell it to use the dmix plug. Do i have to enable a setting in the application itself to get it to work? should i use certain settings for my nforce2 ac97 onboard sound?

I tryed jack but i couldn't seemto get it to work either when ever i ran
Code:
jackd -d alsa
it says it couldn't open usr/lib/jack and says no drivers found.
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
27-Feb-2005, 04:40 AM #5
are you instructing the programs to use ossmix?
-Bender-'s Avatar
Member with 50 posts.
 
Join Date: May 2004
Location: A Small Town in Canada
28-Feb-2005, 12:48 PM #6
nope, how would i tell them to use ossmix?
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
28-Feb-2005, 02:22 PM #7
well for example mplayer you'd do -ao ossmix
in gaim you have the audio option in preferences/options and you can change it there. Its just a per program change so.

I also have noticed one thing missing from mine (forgot to copy it, Whoops ) and from yours.

pcm.!default {
type plug
slave.pcm "dmixer"
}

is the addition.

Also of some help is to tell oss devices to use alsa by default.
What should be in your /etc folder is a libao.conf file. In that you want to add default_driver=alsa

those two additions should allow you to have mixing without doing the above -ao shenanigans.
__________________
Gentoo Developer, and 64bit os user

"In feeding Mother Nature, you are fed in return" - Tsunam (2005). Concerning water conservation, and raising water tables.

Last edited by tsunam : 28-Feb-2005 02:38 PM.
-Bender-'s Avatar
Member with 50 posts.
 
Join Date: May 2004
Location: A Small Town in Canada
01-Mar-2005, 02:59 PM #8
Thanks i got it to work i just had to change
Code:
pcm.!default {
type plug
slave.pcm "dmixer"
}
to use dmix instead of dmixer

Code:
pcm.!default {
type plug
slave.pcm "dmix"
}
Thanks for all your help
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
01-Mar-2005, 07:45 PM #9
glad it works for you, now enjoy your multiple channel software mixing . And you just learned something valuable as well.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 07:52 PM.
Copyright © 1996 - 2010 TechGuy, Inc. All rights reserved.
Powered by Cermak Technologies, Inc.