Sergei Steshenko wrote: > On Sun, 27 Apr 2008 13:29:11 +0100 > Oliver Lupton <oliverlupton@xxxxxxxxx> wrote: > >> Sergei Steshenko wrote: >>> On Sun, 27 Apr 2008 02:19:34 +0200 >>> Rene Herman <rene.herman@xxxxxxxxxxxx> wrote: >>> >>>> mplayer/vlc will just set the rate itself when opening the device, to the >>>> sampling rate of whatever PCM data it wants to play (as does aplay, if you >>>> feed it a wav file which announces the sampling rate of the file in its >>>> header). For recording, if those program can record, you'll be able to >>>> specify the rate in some program-specific way. >>> >>> Doesn't make sense to me. >>> >>> Suppose in one console I'm playing something using 'mplayer' (a CD), so >>> 'mplayer' wants to set sample rate to 44100Hz. >>> >>> At the same time in another console I'm playing something with 'vlc' (a DVD), >>> so 'vlc' wants to set sample rate to 48000Hz. >>> >>> Obviously, the two are mutually exclusive. >>> >>> My understanding is that I as end user mandate the sample rate, and applications >>> not liking my choice have to use resampling - I guess/hope ALSA will take care >>> of this automatically. >>> >>> Regards, >>> Sergei. >> As I understand it, one of two cases applies: >> >> 1) Your card supports hardware mixing, and internally resamples >> everything you throw at it to some common sample rate. Both mplayer and >> vlc open the device at different rates, and the card mangles audio from >> both of them to it's internal rate. >> >> I think the M-Audio control is allowing you to specify the internal rate >> mentioned above, other cards (such as my Audigy 4) do not allow you to >> configure the rate and always use 48000Hz (I believe). >> >> 2) Your card does not support hardware mixing, and you're using dmix to >> supply software mixing. dmix/alsa resamples everything to a common >> sample rate (specified somewhere in the alsa config) and outputs a >> single mixed stream to the DAC. >> >> Disclaimer: I've not used any M-Audio hardware, and I'm not an ALSA expert. >> >> Hope this is vaugely helpful to someone. >> >> Cheers, >> -ol >> > > I still have the M-Audio, though not using it at the time. > > It does not support HW mixing, but allows me to set sample rate. > > Is there a way to lock sample rate ? I.e. to set it once and not to allow > applications to change it, thus forcing them to use 'dmix' ? > > This is the behavior I want. > > Thanks, > Sergei. I believe that is possible, yes. I think that you just have to configure your dmix as the default device ( http://alsa.opensrc.org/index.php/Dmix ) and specify the dmix rate as your chosen global rate. Set the M-audio control to that rate as well, and I think you should have what you want. Usual disclaimer applies I'm afraid (and I'll send it to the right address this time) Cheers, -ol ------------------------------------------------------------------------- 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