Re: [alsa-devel] /usr/share/alsa/alsa.conf :and file extention

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Mon, 17 Mar 2008 04:18:15 +0100,
Rene Herman wrote:
> 
> On 17-03-08 03:57, Alexander Indenbaum wrote:
> 
> > I'm playing with embedded system without any hardware sound device. I'd like
> > to grab sound from ALSA application, for instance Firefox displaying YouTube
> > clip inside flash plugin and to store  output PCM stream into file on local
> > disk. I got an advice to use File extension. So I defined following
> > /usr/share/alsa/alsa.conf
> 
> Don't do it there. Use /etc/asound.conf or $HOME/.asoundrc ...

Or /etc/asound.conf.  It's the additional place for the system-wide
definitions.

> > pcm.default{
> >         type
> > file
> >         file
> > /tmp/pcm.out
> > }
> 
> ... and make it
> 
> pcm.!default {
>          type    file
>          slave   {
>                  pcm     null
>          }
>          file    "/tmp/pcm.out"
> }
> 
> Exactly why you need that slave definition I'm not sure either, but it seems 
> you do.

The file plugin requires the slave for its configuration and as the
timing source.  Using "null" is just to accept any config and feed the
data as fast as possible.  If you need to save the data as if it's
being played, use the kernel dummy driver as the slave.

> Also note that /tmp/pcm.out will be headerless PCM and is recreated 
> for individual opens. I don't believe there's an append mode or anything 
> (and you'd need to make sure that everyone plays the same format) so not 
> toot sure if this is what you need to have a catch all audio-sink...

Recently I added a new option "truncate" to file plugin.  As default,
it's set to true (for compatibility reason), and the plugin overwrite
the existing file if reopened.  When it's set to false, a new file is
created with a different suffix (up to 1000 files) at each time.


Takashi

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux