LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-17-2006, 04:14 PM   #1
tuxedo-notebook
Member
 
Registered: Oct 2003
Distribution: Gentoo 2.6.12, Mepis 2.6.7, KUbuntu PPC
Posts: 43

Rep: Reputation: 15
Making progs use definitions in asound.conf?


Ok, I'm setting up a digital DJ system with a M-Audio Revolution 7.1 with alsa on Arch Linux. I want to be able to play songs from one player through the main speakers while preview other songs over the headphones. I got asound.conf all set up and I can sucessfully play two songs at the same time by doing:

aplay -D main song1.wav

in one console and:

aplay -D preview song1.wav

in another. I want programs like XMMS and amaroK to use these two asound definitions because they go to different channels and convert the format, but I can't figure out how to make the them do it.

With amaroK using gstreamer I can specifiy device (default is /dev/dsp) and parameters. With XMMS only default is in the slector box, but the device (default /dev/dsp) can also be altered.

How can I get my progs using the asound definitions?
 
Old 03-19-2006, 01:02 AM   #2
bluelightning
Member
 
Registered: Mar 2006
Location: Redmond, WA
Distribution: FC4, WinXP Pro
Posts: 37

Rep: Reputation: 15
Some programs use OSS for sound output (/dev/dsp is OSS), other program use ALSA (like aplay). Most people use OSS emulation to map /dev/dsp to ALSA, but that doesn't use your asound.conf. One option is to use aoss instead to emulate /dev/dsp.

A better option for XMMS is to use the ALSA output plugin. Chances are that this is already installed, but you didn't select it. Go to the perferences dialog in XMMS, and select ALSA as your output plugin. Click the configure button. Change audio device to main or preview in your case.
 
Old 03-19-2006, 04:46 AM   #3
tuxedo-notebook
Member
 
Registered: Oct 2003
Distribution: Gentoo 2.6.12, Mepis 2.6.7, KUbuntu PPC
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks for the reply, that really clears things up for me.

After putting the main user in the audio group (apparently OSS doesn't care but ALSA does) XMMS didn't have any trouble outputting through preview using the ALSA output plugin. So that works how I want it now.

Only trouble now is that I'm trying to run two instances of XMMS with different configurations. Seems to me that the only way to do this as the same user is to actually change the ~/.xmms folder before starting each instance (overwriting current configs with two sets of old ones.) Of course I can still run the second instance as root, but I don't want to type a password for sudo in my script and although I doubt it would harm anything, it doesn't seem like always running an app as root is a good idea. I also tried using 'really' (part of chiark-utils) to run xmms as a different user, but I had little sucess with that. Any ideas?

Oh BTW, I did get that script working, but I'd rather keep current configuration for each instance if possible.

Thanks again bluelightning.
 
Old 03-19-2006, 04:56 AM   #4
bluelightning
Member
 
Registered: Mar 2006
Location: Redmond, WA
Distribution: FC4, WinXP Pro
Posts: 37

Rep: Reputation: 15
I don't know what the ideal solution is, but you could try switching your home directory but not user. Just do:
export HOME=newdirectory

If you put that in a script, the variable will only be changed for inside the script. Once the script is done, the variable will be back to normal.

I tried changing HOME on my computer, and I couldn't use the xserver afterwards from that terminal. I had to copy the .Xauthority over to fix it.
 
Old 03-20-2006, 02:16 PM   #5
tuxedo-notebook
Member
 
Registered: Oct 2003
Distribution: Gentoo 2.6.12, Mepis 2.6.7, KUbuntu PPC
Posts: 43

Original Poster
Rep: Reputation: 15
Changing HOME to a different dir in the main user's home worked great and now both instances of XMMS remember their configs. Thanks a lot!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help for ALSA Sound /etc/asound.conf or .asoundrc tho_x_tran Linux - Hardware 0 08-09-2004 02:34 PM
Acronym Definitions... trey85stang General 2 08-05-2004 03:26 PM
Alias Definitions collegenate Linux - Newbie 1 02-09-2003 02:06 AM
Definitions..? mikeyt_333 Linux - General 4 02-06-2002 01:45 PM
Linux Definitions newbietolinux Linux - Newbie 6 01-20-2002 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration