Go to the FreeLists Home Page Home Signup Help Login
 



[haiku-development] || [Date Prev] [09-2007 Date Index] [Date Next] || [Thread Prev] [09-2007 Thread Index] [Thread Next]

[haiku-development] Re: (media) related questions

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 20 Sep 2007 21:51:13 +0200
Hi Bek,

> I was wondering if one of you took a look at my questions? There are 
> multiple things, nobody replied to yet.

please don't take the lack of response as lack of thankfulness with regards 
to your patch. Not in the least!

> 1. What about the style cleanups in the mixer code? Are they ok?

Personally, I have simply not had time yet to look at them. But I will.

> 2. Did anyone find time to answer my questions related to the null_audio?

One problem I can see with this approach is the same which you already 
mentioned in your original post, which is how is the Media Server is 
supposed to ignore this driver if there is a real sound card. One simply 
solution could be that it knows this driver by name, the same way the 
app_server knows and ignores the vesa driver if there is a real driver. On 
the other hand, the BeOS had real MediaNodes for Null In/Out. This could 
have benefits, since you are able to display a special user interface in 
the media preferences and in applications. I have not thought about this 
enough. I don't know pros/cons of this approach enough.

> Beside this, I even have further questions, but I am not sure, if I 
> should ask them here on the development mailing list.

Here is fine!

> I have seen there is a Media Kit mailing list, but that one seems quite 
> inactive, so I try it here:
> 
> 1. If I understood the code correctly, the mixer itself converts buffers 
> twice.
> First each incoming buffer gets converted to an internal format (float) 
> and in the mixing thread they get reconverted to the format the driver 
> needs (int16 in my case/regular?). This attempt is easy to use, but I 
> think it is over headed. Shouldn't it be better, if only one conversion 
> is done during the mixing? Of course this means, that one needs to have a 
> lot of methods for converting everything, but I guess that an unoptimized 
> attempt can be done using templates for this, while the optimized 
> routines can still be used as specifications.

It sounds inefficient at first look, but it might be the most efficient way 
when actual mixing is required. I have only brief experience with mixing in 
my own applications, but expanding the audio samples to a more precise 
format, especially "float", could be the best way to reduce aliasing 
effects. On top of that, float has been advertised as the preferred BeOS 
format, all my BeOS applications output float.

> 2. The BMediaFile implementation (and therefore the whole MediaKit) lacks
> support for encoding. Is anybody working on this?

Not at the moment, it would be great if someone picked this up! I don't 
even know what exactly is missing, is it writers/encoders only? Or is it 
unimplemented functions in the actual media kit classes?

> In addition the code is 
> copyrighted by Marcus Overhagen under BSD license. How is the behavior, 
> if someone wants to add/change something? The coding guidelines do not 
> say anything about this situation. I guess it is not possible to change 
> the license to MIT or replace the copyright header without the author's 
> ok? At least not with the advertisement clause currently present in the 
> source.

The preferred way in this case is to just add your copyright to the file. 
Ie:

/* 2002-2004 Copyright Marcus Overhagen... 
 * ...
 * 2007 Copyright Bek...
 * ...
 */

> I would really like to work on one of these issues (first one because of 
> my performance issues regarding null_audio, later because not implemented 
> at all), but to be honest I want to know whether it is worth the amount 
> of work and someone is actually willing to do the review and/or checks it 
> in when it is done.

Your work is certainly appreciated! I have just been swamped with other 
work, but I wanted to look at your patch as soon as possible. I was 
considering to just commit your null_audio driver, even if it a skeleton 
driver "only" for other drivers, that's already very useful. But I was 
kinda waiting for Marcus or Korli to say something, since the Media Kit is 
their area of expertice.

Best regards,
-Stephan





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.