The time now is Fri 20 Apr 2018, 09:14
All times are UTC - 4 |
Author |
Message |
outsider
Joined: 11 Mar 2007 Posts: 17
|
Posted: Fri 16 Mar 2007, 14:35 Post subject:
Creating virtual sound card Subject description: in alsa |
|
Doesn anyone know how to create a virtual sound card in alsa?
I want to have a virtual card displayed when I run 'cat /proc/asound/cards'
I've looked at the alsa site, scoured the web... Hoping someone can point me in the right direction...
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Fri 16 Mar 2007, 16:37 Post subject:
|
|
i'm not sure, but i think you would need to set up an alias in /etc/modprobe.conf ... though Puppy tends to reconfigure things every time it boots
you can set up as many virtual cards as you like in /etc/asound.conf or /root/.asoundrc, and they will be instantly available ... but they won't be listed in /proc/asound/cards
for example, you can set gxine or xmms to use whichever virtual card you like
for example, this might be a duplicate of your card 0, named "mycard":
pcm.mycard {
type hw
card 0
}
this would make the default sound card "mycard":
pcm.!default mycard
so if you typed this, mplayer would use mycard:
mplayer -ao alsa movie.avi
or you could select which card mplayer will use like this:
mplayer -ao alsa:device=mycard movie.avi
you can see what cards you have to choose from by typing:
aplay -L
if you have 4 speakers, you could create a virtual device that duplicates the sound in the front speakers and plays the sound in the rear speakers too:
pcm.40dup {
type route
slave.pcm surround40
slave.channels 4
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1
}
you could play a movie using 40dup like this:
mplayer -ao alsa:device=40dup movie.avi
you could make "40dup" (or name it anything you like) the default sound card to use like this:
pcm.!default 40dup
|
Back to top
|
|
 |
outsider
Joined: 11 Mar 2007 Posts: 17
|
Posted: Fri 16 Mar 2007, 22:20 Post subject:
|
|
GuestToo wrote: |
you can set up as many virtual cards as you like in /etc/asound.conf or /root/.asoundrc, and they will be instantly available ... but they won't be listed in /proc/asound/cards
|
That's unfortunate...
Here's what I'm trying to accomplish.
On my server machine I have a music server called SlimServer (it indexes your music collections and gives you a slick web interface to control all the clients). I have several Squeeze boxes around the house (clients which play the streams from SlimServer) and I'm trying to set up several more audio zones on the cheap.
So I've got an old PC (running Puppy) with an onboard 4 channel soundcard which I have already split into 2 separate alsa devices.
The client software (which plays the slimserver stream) is a java application called SoftSqueeze. What I was planning on doing is running 2 instances of this application and assign each of the new alsa 2 channel pcm devices to each instance of the java app.
However, java donesn't play too nicely with alsa. All that java can address is actual devices that list in /proc/asound/cards. It can't address specific alsa pcm devices or dmix devices...
So I was hoping that by creating a virtual sound card, I could fool java into outputting to the proper outputs.
|
Back to top
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
[ Time: 0.0357s ][ Queries: 12 (0.0117s) ][ GZIP on ] |