#1351: aliasing is heared with playback 44.1kHz files on 48kHz system sample rate -----------------------------+---------------------------------------------- Reporter: nutela | Owner: pulkomandy Type: bug | Status: assigned Priority: normal | Milestone: R1 Component: Kits/Media Kit | Version: R1/pre-alpha1 Resolution: | Keywords: Blocked By: | Has a Patch: 0 Platform: x86 | Blocking: -----------------------------+---------------------------------------------- Comment (by pulkomandy): I did some tests, printing the buffer sizes in tne Resample function. No matter what sample rate is selected, the resampler always is asked to fill a 2048 frame buffer from a 2048 frame buffer. This leads to using the "no- op" resampler optimization. I have no idea how it ends up converting from 44100 to 48000 Hz that way, but it's definitely not the resampler doing its work. Anyway, the resampler does not know about the actual framerate and try to guess it from the size of the buffers given to it, which is approximate and actually does not work at all, as both input and output buffers are 2048 samples long. You can see that in MixerCore.cpp MixerThread function : * The call to fResampler[i]->Resample use fMixBufferFrameCount as the frame count for the source while it is calculated from the output information, and is equal to the frames_per_buffer(...) used for the destination * Compiling the mixer add on with debug level 4 will make the PRINT call just below that show the buffer sizes are identical * The resampling ratio computed in Resample.cpp is the ratio between these frame counts, and thus is always 1, which means no resampling is ever done. -- Ticket URL: <http://dev.haiku-os.org/ticket/1351#comment:5> Haiku <http://dev.haiku-os.org> Haiku - the operating system.