[openbeosmediakit] Re: MediaFormats ...

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

Heya,

>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 
DecodedFormat(..)
>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
-code/media_kit/MediaFile/easy/easy-media-reader.cpp

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
/mplay

  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 
to
>create our own without breaking the NDA ?
>
>And as Be was still working on this kit, wouldn't it be better to provide a 
>new 
>API
>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 
developed.

>So far it looks like I'm better of writing my custom importers / exporters 
>for 
>my
>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?


-- 
Cheers
David

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

iQA/AwUAOoJlpeukVpGCXs38EQJLrQCdHdXyRe79paTWNPQK7RXJdXs2WpAAoNqs
KOYrgPTv0AquHh7G1DbmW2gL
=84aq
-----END PGP SIGNATURE-----

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


Other related posts: