2 * OpenSound media addon for BeOS and Haiku
4 * Copyright (c) 2007, François Revol (revol@free.fr)
5 * Distributed under the terms of the MIT License.
7 * Based on MultiAudio media addon
8 * Copyright (c) 2002, 2003 Jerome Duval (jerome.duval@free.fr)
11 #ifndef _OPENSOUNDADDON_H
12 #define _OPENSOUNDADDON_H
14 #include <MediaDefs.h>
15 #include <MediaFormats.h>
16 #include <MediaAddOn.h>
18 #define SETTINGS_FILE "Media/oss_audio_settings"
22 class OpenSoundAddOn
:
26 virtual ~OpenSoundAddOn(void);
27 explicit OpenSoundAddOn(image_id image
);
29 /**************************/
30 /* begin from BMediaAddOn */
32 virtual status_t
InitCheck(
33 const char ** out_failure_text
);
34 virtual int32
CountFlavors(void);
35 virtual status_t
GetFlavorAt(
37 const flavor_info
** out_info
);
38 virtual BMediaNode
* InstantiateNodeFor(
39 const flavor_info
* info
,
41 status_t
* out_error
);
42 virtual status_t
GetConfigurationFor(
43 BMediaNode
* your_node
,
44 BMessage
* into_message
);
45 virtual bool WantsAutoStart(void);
46 virtual status_t
AutoStart(
48 BMediaNode
** out_node
,
49 int32
* out_internal_id
,
52 /* end from BMediaAddOn */
53 /************************/
56 status_t
RecursiveScan(const char* path
, BEntry
*rootEntry
= NULL
);
57 void SaveSettings(void);
58 void LoadSettings(void);
60 void RegisterMediaFormats(void);
62 status_t fInitCheckStatus
;
65 BMessage fSettings
; // settings loaded from settings directory
68 extern "C" _EXPORT BMediaAddOn
*make_media_addon(image_id you
);
70 #endif /* _OPENSOUNDADDON_H */