1/* Written by Eric Moon, from the Cortex Source code archive. 2 * Distributed under the terms of the Be Sample Code License 3 */ 4 5// ToneProducerAddOn.h 6// e.moon 4jun99 7// 8// PURPOSE 9// Quickie AddOn class for the ToneProducer node. 10// 11 12#ifndef __ToneProducerAddOn_H__ 13#define __ToneProducerAddOn_H__ 14 15#include <MediaAddOn.h> 16 17// -------------------------------------------------------- // 18 19class ToneProducerAddOn : 20 public BMediaAddOn { 21 typedef BMediaAddOn _inherited; 22 23public: // ctor/dtor 24 virtual ~ToneProducerAddOn(); 25 explicit ToneProducerAddOn(image_id image); 26 27public: // BMediaAddOn impl 28virtual status_t InitCheck( 29 const char** out_failure_text); 30virtual int32 CountFlavors(); 31virtual status_t GetFlavorAt( 32 int32 n, 33 const flavor_info ** out_info); 34virtual BMediaNode * InstantiateNodeFor( 35 const flavor_info * info, 36 BMessage * config, 37 status_t * out_error); 38virtual status_t GetConfigurationFor( 39 BMediaNode * your_node, 40 BMessage * into_message); 41 42virtual bool WantsAutoStart() { return false; } 43virtual status_t AutoStart( 44 int in_count, 45 BMediaNode ** out_node, 46 int32 * out_internal_id, 47 bool * out_has_more) { return B_OK; } 48}; 49 50#endif /*__ToneProducerAddOn_H__*/ 51