00001 00002 //TODO add mp3/ogg support to NetworkPlayer and deprecate this class. OfflineNetworkPlayer excepts multi-track wav files 00003 00004 #ifndef _MonoOfflineNetworkPlayer_hxx_ 00005 #define _MonoOfflineNetworkPlayer_hxx_ 00006 00007 #include "NetworkPlayer.hxx" 00008 #include "AudioSource.hxx" 00009 #include "AudioSink.hxx" 00010 00011 namespace CLAM 00012 { 00013 00014 00015 class MonoOfflineNetworkPlayer : public NetworkPlayer 00016 { 00017 std::vector<std::string> _filenames; 00018 bool _enableLoopInputWavs; 00019 float _resultWavsTime; 00020 00021 00022 public: 00023 MonoOfflineNetworkPlayer() 00024 : _enableLoopInputWavs(false) 00025 , _resultWavsTime(0.0) 00026 {} 00027 void AddInputFile( const std::string& ); 00028 void AddOutputFile( const std::string& ); 00029 // base class (virtual) interface: 00030 bool IsWorking(); 00031 std::string NonWorkingReason(); 00032 virtual bool IsRealTime() const { return false; } 00033 virtual void Start(); 00034 virtual void Stop(); 00035 00036 void ProcessInputFile(); 00037 00038 // specific interface - not inherited 00039 void EnableLoopInputWavs() 00040 { 00041 _enableLoopInputWavs=true; 00042 } 00043 void SetResultWavsTime( double time) 00044 { 00045 _resultWavsTime=time; 00046 } 00047 }; 00048 00049 } 00050 #endif 00051