2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 ** Distributed under the terms of the MIT License.
8 #include "MusePackReader.h"
9 #include "MusePackDecoder.h"
13 MusePackPlugin::NewReader()
15 return new MusePackReader();
19 MusePackPlugin::NewDecoder(uint index
)
21 return new MusePackDecoder();
24 static media_format muse_pack_formats
[1];
27 MusePackPlugin::GetSupportedFormats(media_format
** formats
, size_t * count
)
29 media_format_description description
;
30 description
.family
= B_MISC_FORMAT_FAMILY
;
31 description
.u
.misc
.file_format
= 'mpc ';
32 description
.u
.misc
.codec
= 'MPC7';
33 // 7 is the most recent stream version
36 format
.type
= B_MEDIA_ENCODED_AUDIO
;
37 format
.u
.encoded_audio
= media_encoded_audio_format::wildcard
;
39 BMediaFormats mediaFormats
;
40 status_t result
= mediaFormats
.InitCheck();
44 result
= mediaFormats
.MakeFormatFor(&description
, 1, &format
);
48 muse_pack_formats
[0] = format
;
50 *formats
= muse_pack_formats
;
63 return new MusePackPlugin();