On 8/21/06, John Rigg <ad@xxxxxxxxxxxxxxx> wrote: > On Mon, Aug 21, 2006 at 03:02:07PM +0200, Marc Brooker wrote: > > Let me see if I understand you correctly. In the scenario that you > > presented the application is told that there are 940 samples per > > period. ALSA, internally, converts these to 1024 samples per period at > > 48kHz sample rate. So the material (sampled at 44100Hz) is played back > > at a rate of 44062Hz? I don't know enough about the field to know if > > this error (0.08%) will be audible. > > To put that in perspective, a semitone is around 6% change in pitch. > The error here looks small at 0.08% but it's enough to make a musical > note sound out of tune. > > John > Would it not be possible to abuse the SRC algorithm to fix this pitch shift when it does the rate convertion. Instead of setting the source rate to 44100Hz (the real rate of the material), you set it to the rate that ALSA's rounding off causes (44062Hz, unless I am mistaken). In this way, as far as I can see, the SRC algorithm would fix the pitch shift. Or is this a stupid idea? On a related note, on an Athlon64 3200+ running Ubuntu Dapper for i386 with backported alsa-libs 1.0.11 and alsa-plugins 1.0.11 (with samplerate plugin) cpu usage figures (while playing a VBR mp3 using gstreamer): standard ALSA linear: 2% samplerate: 6% samplerate_medium: 9% samplerate_best: 20% >From this it seems that samplerate_best is too costly, but samplerate and samplerate_medium would be usable on most modern hardware. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel