4 #include "audiodevice.inc"
5 #include "condition.inc"
11 #include "recordgui.inc"
12 #include "recordthread.inc"
16 class RecordAudio
: public Thread
19 RecordAudio(MWindow
*mwindow
,
21 RecordThread
*record_thread
);
25 // start saving audio data to file
27 void start_recording();
28 // Called by record thread if audio is the only thing.
29 // Called by video recording if video and audio are being recorded.
34 void reset_parameters();
36 // seek to a new location in the file
37 int set_position(int64_t position
);
38 int64_t sync_position();
40 void write_buffer(int skip_new
= 0); // write the buffer
41 // Want one thread to dictate the other during shared device recording.
49 RecordThread
*record_thread
;
54 int buffer_size
, fragment_size
;
55 int64_t fragment_position
;
58 Condition
*trigger_lock
;
60 int write_result
, grab_result
;
69 // c-file-style: "linux"