--- rate_samplerate.c.old 2007-02-21 19:49:05.000000000 +1100 +++ rate_samplerate.c 2007-02-21 19:49:16.000000000 +1100 @@ -38,7 +38,7 @@ struct rate_src *rate = obj; if (frames == 0) return 0; - return (snd_pcm_uframes_t)(frames * rate->ratio); + return (snd_pcm_uframes_t)(frames / rate->ratio); } static snd_pcm_uframes_t output_frames(void *obj, snd_pcm_uframes_t frames) @@ -46,7 +46,7 @@ struct rate_src *rate = obj; if (frames == 0) return 0; - return (snd_pcm_uframes_t)(frames / rate->ratio); + return (snd_pcm_uframes_t)(frames * rate->ratio); } static void pcm_src_free(void *obj)