00001 // -*- c++ -*- 00002 // Generated by assa-genesis 00003 //------------------------------------------------------------------------------ 00004 // $Id: WavJoin.h,v 1.4 2003/02/07 05:15:08 vlg Exp $ 00005 //------------------------------------------------------------------------------ 00006 // WavJoin.h 00007 //------------------------------------------------------------------------------ 00008 // 00009 // Author : Vladislav Grinchenko 00010 // Date : Sun Dec 16 20:21:04 2001 00011 // 00012 // History: 00013 // 00014 // When Who What 00015 // ---------- --- -------------------------- 00016 // 12/16/01 VLG Created 00017 // 00018 //------------------------------------------------------------------------------ 00019 #ifndef WavJoin_H 00020 #define WavJoin_H 00021 00022 #include <string> 00023 #include <vector> 00024 #include <audiofile.h> 00025 00026 #include <assa/GenServer.h> 00027 #include <assa/Singleton.h> 00028 #include <assa/TimeVal.h> 00029 00030 class WavJoin : 00031 public ASSA::GenServer, 00032 public ASSA::Singleton<WavJoin> 00033 { 00034 public: 00035 WavJoin (); 00036 00037 virtual void initServer (); 00038 virtual void processServer (); 00039 00040 int get_exit_value () const { return m_exit_value; } 00041 void set_exit_value (int v_) { m_exit_value = v_; } 00042 00043 private: 00044 // An example of processing positional arguments 00045 virtual void pos_arg (const char* arg_); 00046 00047 int open_out_file (void); 00048 void close_out_file (bool terminated_); 00049 int join_file (const string& fname_); 00050 00051 private: 00052 static const unsigned short int FRAME_BUFFER_SIZE; 00053 typedef vector<string> List_t; 00054 00055 AFfilesetup m_out_file_setup; 00056 AFfilehandle m_out_file; 00057 string m_out_fname; 00058 string m_out_temp_fname; 00059 00060 List_t m_fnames_list; // List of file names to process 00061 u_int m_pos_arg_count; // Number of pos. arguments processed 00062 int m_exit_value; // Return status of the process 00063 bool m_percent; // Report name and percentage completion 00064 }; 00065 00066 00067 #endif // WavJoin_H 00068