#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. Here's how it goes : * The mixer media add-on doesn't handle input format changes and assumes all the inputs are at the same framerate as the output * As a result, no resampling at all is done : the resampler gets two buffers of the same size and just copies data between them * Dropping or inserting samples must be done somewhere else, no idea where. To fix this properly we have to implement InputFormatChanged in the MixerCore and tell the resampler which frame rate it should be using for the input. OutputFormatChanged should also tell it the output format, so the resampler can compute the resampling factor from the exact sample rate, rather than the buffers size. This means the resampler should be allowed to either not fill the dest buffer, or not empty the source one completely, depending on the available data and space, and the sample rate ratio between input and output. A lot of refactoring is needed to get all this working. -- Ticket URL: <http://dev.haiku-os.org/ticket/1351#comment:3> Haiku <http://dev.haiku-os.org> Haiku - the operating system.