1 /* Copyright (c) 2000-2008, Ingo Weinhold <ingo_weinhold@gmx.de>, 2 * All Rights Reserved. Distributed under the terms of the MIT license. 3 */ 4 5 /*! This class is an interface used by the AudioProducer to retreive the 6 audio data to be played. */ 7 #ifndef AUDIO_SUPPLIER_H 8 #define AUDIO_SUPPLIER_H 9 10 11 #include <MediaDefs.h> 12 13 14 class AudioProducer; 15 16 class AudioSupplier { 17 public: 18 AudioSupplier(); 19 virtual ~AudioSupplier(); 20 21 virtual void SetAudioProducer(AudioProducer* producer); 22 23 virtual status_t GetFrames(void* buffer, int64 frameCount, 24 bigtime_t startTime, 25 bigtime_t endTime) = 0; 26 27 virtual void SetFormat(const media_format& format) = 0; 28 29 virtual status_t InitCheck() const; 30 31 protected: 32 AudioProducer* fAudioProducer; 33 }; 34 35 36 #endif // AUDIO_SUPPLIER_H 37