You are not logged in.

#1 2006-08-20 10:05:33

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

How play two files at same time?

If one sound playing, then other can not play, need first stop, then other sound can play.
How play 2 sounds at same time?


Goodbye!

Offline

#2 2006-08-20 10:21:48

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Offline

#3 2006-08-20 14:53:06

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How play two files at same time?

http://wiki.archlinux.org/index.php/All … nd_at_once:
"Put the following lines into /etc/asound.conf."
But not is on my computer /etc/asound.conf file.


Goodbye!

Offline

#4 2006-08-20 19:35:07

kill
Member
Registered: 2004-09-30
Posts: 126

Re: How play two files at same time?

alikas wrote:

But not is on my computer /etc/asound.conf file.

Just make a file called asound.conf in /etc/ and put the needed text in it.

Offline

#5 2006-08-20 20:20:45

dedhart
Member
Registered: 2006-07-02
Posts: 123

Re: How play two files at same time?

In all recent alsa drivers you no longer need an asound.conf file and it is recomended that you delete this file if you have it, you only need to make sure your programs use the alsa sound system (rather than oss which is enabled by default). If you are using a sound daemon (such as arts) you can set the default sound system to alsa in the control center. Some programs aren't alsa compatible, but can use aoss such as firefox. put the following script in /usr/bin/firefox to get it working nicely with other programs:

#!/bin/bash

export MOZILLA_LAUNCHER=firefox

aoss /opt/mozilla/bin/firefox "$@"

If you are not using a sound daemon, sdl games can be set by putting the following script in /etc/profile.d/sdl.sh

#!/bin/bash

export SDL_AUDIODRIVER="alsa"

make sure to make scripts executable with 'chmod +x /path/to/file' and use 'source /etc/profile' to reset sdl audiodriver.

Offline

#6 2006-08-21 04:48:16

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How play two files at same time?

Did I rihgt understand, that first need put following script in /etc/profile.d/sdl.shCode:
#!/bin/bash

export SDL_AUDIODRIVER="alsa"

Then in terminal write: 'chmod +x /etc/profile.d/sdl.shCode' and write in console: 'source /etc/profile'?


Goodbye!

Offline

#7 2006-08-21 18:23:49

dedhart
Member
Registered: 2006-07-02
Posts: 123

Re: How play two files at same time?

Well I'd name the file 'sdl.sh' not 'sdl.shCode', but you got the idea. That will work for sdl games such as lbreakout2 or frozen bubble, most multimedia programs (such as mplayer, xine xmms or audacious) can be configured in thier options menu. Again you could just have a sound daemon take care of that for all programs that are alsa compatible, if you are using a flash plugin I'd recomend configuring firefox as mentioned above, it does not work w/ alsa so you will need to use aoss (pacman -S alsa-oss if unsure)

Offline

#8 2006-08-21 18:43:45

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How play two files at same time?

I do not play games.
Not mixing some .exe, who using sound with Audacity.


Goodbye!

Offline

#9 2006-08-21 18:55:29

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: How play two files at same time?

alikas wrote:

Not mixing some .exe, who using sound with Audacity.

What do you mean?

Btw, most linux executables don't end in .exe wink

Offline

#10 2006-08-21 19:00:44

dedhart
Member
Registered: 2006-07-02
Posts: 123

Re: How play two files at same time?

Thats a little trickier, you can try sweep instead. See http://audacityteam.org/wiki/index.php? … inuxIssues

compiling w/ portaudio19 may allow you to use audacity with alsa drivers. You can get portaudio19 in the AUR http://aur.archlinux.org/packages.php?d … s=0&SeB=nd

Offline

#11 2006-08-21 19:02:52

dedhart
Member
Registered: 2006-07-02
Posts: 123

Re: How play two files at same time?

Offline

#12 2006-08-22 13:10:25

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How play two files at same time?

I have added 'alsa' to 'DAEMONS' and 'snd-oss snd-cs4236' to 'MODULES' in '/etc/rc.conf' file.
How make, that then other program using divice, Audacity play sound?
I try "rm /dev/dsp;ln -s /dev/dsp0 /dev/dsp  #also try /dev/dsp1,2,etc.
chmod 666 /dev/dsp0", but get erorr about 'chmod:' and `/dev/dsp0'.
I also try 'aoss audacity', but not mixing sounds.


Goodbye!

Offline

#13 2006-09-02 16:44:33

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How play two files at same time?

I create new file

#/etc/asound.conf start:
pcm.!default {
    type plug
    slave.pcm "dmixer"
}
pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
}
pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 1024
        ipc_key_add_uid 0
        buffer_size 8192
        rate 44100
    }
    bindings {
        0 0
        1 1
    }
}

ctl.dmixer {
    type hw
    card 0
}

#end.

And create new file '/etc/libao.conf', it content:

default_driver=alsa10

But not play two sound at once.
I make that say in 'http://wiki.archlinux.org/index.php/All … nd_at_once'.


Goodbye!

Offline

Board footer

Powered by FluxBB