Re: How can I convert all sample rates to 48KHz using default audio device

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

 



On Tue, 11 Nov 2008, Owen.yan wrote:

> Hi All:
>
>
>
>         How can I convert all sample rates to 48KHz using default audio
> device?
>
>         I know I can do this by modifying the configure file "asound.conf"
> and add a slave device. And then use "#aplay -v -D rate_convert file.wav" to
> play.

You probably do not want to do this. Rate conversion can be a pretty
horrible thing-- introduces lots of distortion and noise. There are rate
conversion routines which do not, but they tend to be slow. I think, but
am not sure, alsa still uses linear interpolation which is pretty
horrible. See www.theory.physics.ubc.ca/soundcard/resample.html
for a comparison of the noise produced by various of the sox rate
conversion routines. See especially the linear interpolation one.
The reason linear is used in sox is because it is fast enough to make
sure that you can keep up with the audio stream, and so as not to have
too large a latency. Other, better conversion routines have to act on a
much larger block of data at a time, meaning that the whole block needs
to be read in then processes before the first item from the block can be
played.




>
>         But which file should be modified if I want to use the default
> audio device? And how to modify? I hope after this, the rate will be
> converted automatically by using command "#aplay -v file.wav" without "-D
> device_name".
>
>
>
> Thanks.
>
>
>
>
>
>
> ====================================================================
> CONFIDENTIALITY NOTE:
> This e-mail and any attachments may contain confidential information and may
> be protected by legal privilege. If you are not the intended addressee (or
> authorized to receive for the addressee), be aware that any disclosure,
> copying, distribution or use of this e-mail or any attachment is prohibited.
> If you have received this e-mail in error, please notify us immediately by
> returning it to the sender and delete this copy from your system. Thank you
> for your cooperation.
> Infomax Communication Co., Ltd.
> ====================================================================
>

-- 
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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