[haiku-development] Mixer resampler API

  • From: pulkomandy <pulkomandy@xxxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 18 Aug 2010 15:02:41 +0200

Hello,
Some days ago I introduced a new resampler that uses interpolation in
the media kit. I'm still not happy with it, so I'm going to write
another resampler, this time using a Lanczos filter, which should give
much better results.

However, the current API feels a bit unhandy for that purpose. For the
filter to be efficient, I'd need to know some things when constructing
my resampler object. With the current API, I can only know the format of
the input and output, I'd also need the sample rate at that point to
pre-calculate some tables of coefficients. Is it ok to make change to
this API, or is it something that would create ABI problems ? It doesn't
look like it's public anywhere. The code is in Resampler.cpp and
MixerCore.cpp, in src/add-ons/media/media-add-ons/mixer/ .

Another thing I'd like to know about the resampling is if the calls to
Resample are done in order or if the buffers may get there in random
order. This is important because I have to store data (a delay line)
accross calls to this function, and it is important that the data is
used in the right order.

One last thing : for debugging I'd like to add some printf() to the
class I'm going to write. I think they will be printed on the console
media_server is attached to. Is there a way to grab the input of the
media_server started at boot ? Reattaching its stdout in some way ? Or
should I kill the media server and restart it from terminal ?

Thanks for your help,

-- 
Adrien.

Other related posts: