[haiku-development] Re: Mixer resampler API

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 18 Aug 2010 15:13:42 +0200

pulkomandy <pulkomandy@xxxxxxxxxxxxxxxxx> wrote:
> 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/ .

Just go ahead, the mixer is a completely separate component.

> 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.

I've no idea, but I would assume that the resampler is called for every 
input, since it's probably easier to merge equal streams as opposed to 
those with different sample rate or frame size. So you might need some 
object per input that maintains the data (or have a resampler for each 
input, I don't know how that works off hand, exactly).

> 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

You can just replace the line in your /system/boot/Bootscript:
exec >/dev/null 2>&1

with:
exec >/dev/dprintf 2>&1

and you'll see all the output.

> media_server started at boot ? Reattaching its stdout in some way ? 
> Or
> should I kill the media server and restart it from terminal ?

That would work as well. Quitting it would be the smoother solution, 
though ;-)

Bye,
   Axel.


Other related posts: