Re: Output sample rate
Rob Leslie <[email protected]> Tue, 12 Oct 2004 12:42:04 -0700
| Newsgroups | gmane.comp.audio.mad.devel |
|---|---|
| Message-ID | <[email protected]> |
On Oct 12, 2004, at 12:18 PM, Emil Rojas wrote: > Any clues on where one actually controls the output sample rate in the > library? I have tried to figure it out but I am unable to figure it > out. The output sample rate is determined by the MPEG stream input. The only option provided by the library is to generate output at exactly 1/2 this sample rate -- mad_stream_options(stream, MAD_OPTION_HALFSAMPLERATE). The library does not provide general resampling facilities; if you want to produce output with an arbitrary sampling frequency, you will have to resample the output yourself or with another library. See for example the resample.c code in madplay. -- Rob Leslie [email protected]