Csound Csound-dev Csound-tekno Search About

auto selecting soundcard under alsa

Date2006-01-04 22:25
FromAtte André Jensen
Subjectauto selecting soundcard under alsa
Hi

Istvan pointed out in a thread a week ago that I can access the second 
sound card under alsa by using -o dac:hw:1, which works well.

Now the problem is that I have an onboard sound card and a usb sound 
card. Is it possible to specify (in .csoundrc) that csound should use 
the usb card if available and fall back to the onboard otherwise?

-- 
peace, love & harmony
Atte

http://www.atte.dk

Date2006-01-04 23:26
FromSteven Yi
SubjectRe: auto selecting soundcard under alsa
AttachmentsNone  

Date2006-01-05 02:25
FromDavid Akbari
SubjectRe: auto selecting soundcard under alsa
Although I cannot readily think of a way to do this with only a 
.csoundrc, .asoundrc, et al I can imagine that an elegant solution 
could be to create a shell script that has a conditional statement that 
looks at which card is currently active or preferred in a user-defined 
settings file.

Could it be possible to have a shell script look at the sound card 
preference (possibly within $HOME) on startup and then call Csound with 
the correct commandline options ?

Just a thought ... I'd be most definitely interested to hear other's 
preponderance to this solution as well !!


-David

On Jan 4, 2006, at 5:26 PM, Steven Yi wrote:

> I've actually just run into this too after purchasing a USB soundcard
> a couple weeks ago; would love to find out a good way to do this too,
> either with .csoundrc or .asoundrc.
>
> On 1/4/06, Atte André Jensen  wrote:
>> Hi
>>
>> Istvan pointed out in a thread a week ago that I can access the second
>> sound card under alsa by using -o dac:hw:1, which works well.
>>
>> Now the problem is that I have an onboard sound card and a usb sound
>> card. Is it possible to specify (in .csoundrc) that csound should use
>> the usb card if available and fall back to the onboard otherwise?

Date2006-01-05 08:45
FromAtte André Jensen
SubjectRe: auto selecting soundcard under alsa
David Akbari wrote:

> Could it be possible to have a shell script look at the sound card 
> preference (possibly within $HOME) on startup and then call Csound with 
> the correct commandline options ?

An what is you want to call csound with -o file.wav? Then you'd have to 
use the regular csound or?

> Just a thought ... I'd be most definitely interested to hear other's 
> preponderance to this solution as well !!

I also thought about this. A wrapper would be possible, but it's 
un-elegant and can cause more trouble...

-- 
peace, love & harmony
Atte

http://www.atte.dk

Date2006-01-05 09:15
FromSteven Yi
SubjectRe: auto selecting soundcard under alsa
AttachmentsNone