[openbeosmediakit] Re: MediaFormats ...

  • From: David McPaul <dmcpaul@xxxxxxxxxxxxxx>
  • To: openbeosmediakit@xxxxxxxxxxxxx
  • Date: Wed, 22 May 2002 23:33:41 +1000


>you're verry kind to offer that service, thanks !
>Now working on SampleStudio's saving routines brings up a lot of trouble.
>It start with loading:
>    I try to decode a 16bit file into a B_AUDIO_FLOAT buffer in memory.
>BeOS does not let me choose this format. The B_AUDIO_FLOAT gives a
>compile error. When I manualy set it to 0x24 and invoke the 
>it simply overrides this and put it back to 16bit integers.
>I also see no way to save any other bit-size converted from floats directly.
>I need to do this by hand also.

Hmm, ok I suggest you have a look at the sample code in /boot/optional/sample

That shows how to open a file and extract raw audio from it.
For a more complex one look at /boot/optional/sample-code/media_kit/MediaFile

  If you have a valid decoder then it should return you buffers of whatever 
the decoder can handle.  Some decoders may not be able to give you what you 
want though, you basically ask for a format but the decoder may say no.

>While the encoders/decoder are under NDA, I am wondering if it is possible 
>create our own without breaking the NDA ?
>And as Be was still working on this kit, wouldn't it be better to provide a 
>for this purpose ??

I believe that this is what will be done.  We cannot recreate the current 
BeOS encoder/decoder API as it was never public so a new one will be 

>So far it looks like I'm better of writing my custom importers / exporters 
>media apps.

Hmm,  maybe.  If you write some code to decoder/encode the data you want I 
can turn it into a decoder/encoder.

What file formats are you trying to do?


Version: PGPfreeware 5.0i for non-commercial use
MessageID: dipc5u1ta+kiFMBsP8n5dI0uO8EdILK1


If you're not very clever you should be conciliatory.
                -- Benjamin Disraeli

Other related posts: