Re: how do I change sample rate ?

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

 



On Mon, 28 Apr 2008 09:01:04 +1200
Pete Black <pete@xxxxxxxxxxxxxxxxx> wrote:

> I'm no expert, but as far as I can tell:
> 
> Currently, it seems that the sample rate setting is supposed to be 
> managed by applications (where application includes user space ALSA 
> plugins etc.) - an application tries to open a channel to the hardware 
> device with a specific sample rate - if the hardware supports it, the 
> hardware is switched to that rate. If not, you get an error.
> 
> The practical upshot of this is that the audio daemon you are using 
> (JACK, ALSA dmix or whatever the native 'soft mixer' component is these 
> days) which is actually driving the hardware directly needs to be 
> configured with the sample rate it will access the hardware with.
> 
> Currently, this is done with JACK by launching it with a command-line 
> flag, and on ALSA dmix by editing the user or system .asoundrc files.
> 
> So, the control is there, but not at the 'mixer' level of the stack - 
> while i guess it would be a valid design to restrict all applications to 
> a single mixer-specified sample rate, which you would change on a global 
> basis, this is not the way its done. The application with exclusive 
> control over the sound channel (or, presumably, the first application to 
> open a channel on a driver that supports multiple hardware channels) 
> sets the rate to be used until termination. 'On the fly' rate switching 
> might be possible, but i expect any support for this would be done by 
> closing the channel and requesting a re-open with a new rate.
> 
> I might have the details wrong on this, but as far as I know, this is 
> how it works
> 
> -Pete
> 

Honestly, have you painted a consistent trouble-free picture ?

For example, this:

"
The application with exclusive 
control over the sound channel (or, presumably, the first application to 
open a channel on a driver that supports multiple hardware channels) 
sets the rate to be used until termination
"

- suppose, again, 'mplayer' wants 44100Hz while 'vlc' wants 48000Hz,
how are they supposed to switch sample rate while simultaneously working ?

I, as end user, may understand the need to sometimes grant an application an
exclusive access but it shouldn't be an application which decides on this,
it should be me who decides which applications have exclusive access.

Aren't we talking about the basics of OSes ?

Does anyone expect coherent OS functioning if every application is allowed
to change SATA/IDE channels settings for the drive on which system-wide
filesystem resides ?

Thanks,
  Sergei.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
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