Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Rate Conversion
@ 2002-06-27  8:29 Kris Modrak
  2002-06-27 14:11 ` Jaroslav Kysela
  0 siblings, 1 reply; 7+ messages in thread
From: Kris Modrak @ 2002-06-27  8:29 UTC (permalink / raw)
  To: alsa-devel

I am writing a PCM application and wish to play a .wav file that has a
sampling rate of 8kHz on a hardware setup that only supports sampling
frequencies of 44.1 or 48kHz.

Does anyone know how to implement this?

I have tried setting up a rate plugin in my .asoundrc file

pcm.r8 {
        type rate               # Rate PCM
        slave slave_rate8000Hz  # Slave name
}

pcm_slave.slave_rate8000Hz {
        pcm "hw:0,0"
        rate 8000
}

But when using this device I am unable to set the rate to 8000 using
snd_pcm_hw_params_set_rate_near ();

I tried using the r8 device with aplay (version 0.9.0beta12) and get the
following error

> aplay -Dr8 s1.wav
Playing WAVE 's1.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
aplay: set_params:717: Broken configuration for this PCM: no
configurations available

I know it is possible to play the file because it works when I play it
from a netscape window.

Thanks in advance
Kris Modrak


-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-07-02  0:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200206281126.g5SBQLTk004595@anu.edu.au>
2002-07-02  0:43 ` Rate Conversion Kris Modrak
2002-06-27  8:29 Kris Modrak
2002-06-27 14:11 ` Jaroslav Kysela
2002-06-28  3:30   ` Kris Modrak
2002-06-28 11:28     ` Paul Davis
2002-07-01  2:19       ` Kris Modrak
2002-07-01 11:51         ` Paul Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox