Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

recordaudio.h

Go to the documentation of this file.
00001 #ifndef RECORDAUDIO_H
00002 #define RECORDAUDIO_H
00003 
00004 #include "audiodevice.inc"
00005 #include "condition.inc"
00006 #include "guicast.h"
00007 #include "file.inc"
00008 #include "mutex.inc"
00009 #include "mwindow.inc"
00010 #include "record.inc"
00011 #include "recordgui.inc"
00012 #include "recordthread.inc"
00013 #include "thread.h"
00014 
00015 
00016 class RecordAudio : public Thread
00017 {
00018 public:
00019         RecordAudio(MWindow *mwindow,
00020                 Record *record, 
00021                 RecordThread *record_thread);
00022         ~RecordAudio();
00023         
00024         void run();
00025 // start saving audio data to file
00026         int arm_recording();
00027         void start_recording();
00028 // Called by record thread if audio is the only thing.
00029 // Called by video recording if video and audio are being recorded.
00030         int stop_recording();
00031         void rewind_file();
00032         void finish_loop();
00033         void finish_timed();
00034         void reset_parameters();
00035 
00036 // seek to a new location in the file 
00037         int set_position(int64_t position);     
00038         int64_t sync_position();
00039 
00040         void write_buffer(int skip_new = 0);           // write the buffer
00041 // Want one thread to dictate the other during shared device recording.
00042 // Done with batch
00043         int batch_done;
00044 
00045 
00046 private:
00047         MWindow *mwindow;
00048         Record *record;
00049         RecordThread *record_thread;
00050         double *max;
00051         int *over;
00052         double **input;
00053         RecordGUI *gui;
00054         int buffer_size, fragment_size;
00055         int64_t fragment_position;
00056         int record_channels;
00057         Mutex *timer_lock;
00058         Condition *trigger_lock;
00059         Timer timer;
00060         int write_result, grab_result;
00061 };
00062 
00063 
00064 
00065 #endif

Generated on Sun Jan 8 13:38:59 2006 for Cinelerra-svn by  doxygen 1.4.4