[haiku-development] Re: Considering the audio Mixer formats

  • From: Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 6 Feb 2016 15:58:12 +0100

Hi,


* The application could do the conversion to float itself, but that'd be a
waste because every application has to implement it, again and again.


BeAPI programs usually use our encoders to obtain data in the specified
format. I think the great majority of apps, doesn't deal with the current
storage format and just get as a pratice habit buffers in floating point
format. For example MediaPlayer do so, and right now (look at the audio
producer) doesn't support anything than floating point.


* Provide a separate format conversion media node which accepts many
formats as input, and only float as output.


It might be a solution depending on the situation, but of course I'm trying
to avoid conversion at all, i.e. it would be nice if we get the real time
processing to be done only in floating point.

* Leave things as is, let the mixer take in any format and deal with the
conversion internally.


At some point the conversion to float will happen anyway, as the soundcard
will accept data only in this format. The real change would be to avoid the
mixer dealing with any other format and optimize everything taking
advantage of modern FPUs.



Solutions 2 and 3 would be both fine with me. However, regarding your
comment on things supposedly being overly complex... please note that
you're not really removing any complexity here, you're just moving it
elsewhere.


What I see is that in pratice node tends to implement only B_AUDIO_FLOAT
and in professional word it's just the standard. If our nodes could take
care of just one format, the entire ecosystem could benefit of it.

Best Regards,
Dario

Other related posts: