00001 #ifndef REPEATABLE_H 00002 #define REPEATABLE_H 00003 00004 00005 #include "audiere.h" 00006 00007 00008 namespace audiere { 00009 00010 class RepeatableStream : public RefImplementation<SampleSource> { 00011 public: 00012 RepeatableStream(SampleSource* source); 00013 00014 void setRepeat(bool repeat); 00015 bool getRepeat(); 00016 00017 void ADR_CALL getFormat( 00018 int& channel_count, 00019 int& sample_rate, 00020 SampleFormat& bits_per_sample); 00021 00022 int ADR_CALL read(int frame_count, void* buffer); 00023 void ADR_CALL reset(); 00024 00025 bool ADR_CALL isSeekable(); 00026 int ADR_CALL getLength(); 00027 void ADR_CALL setPosition(int position); 00028 int ADR_CALL getPosition(); 00029 00030 private: 00031 bool m_repeat; 00032 RefPtr<SampleSource> m_source; 00033 int m_frame_size; // convenience 00034 }; 00035 00036 } 00037 00038 00039 #endif
1.2.17