4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "audiodevice.inc"
26 #include "condition.inc"
30 #include "mwindow.inc"
32 #include "recordgui.inc"
33 #include "samples.inc"
36 class RecordAudio : public Thread
39 RecordAudio(MWindow *mwindow, Record *record);
44 void start_recording();
46 void pause_recording();
47 void resume_recording();
48 void reset_parameters();
51 Samples **get_buffer();
53 int write_buffer(int samples);
55 void set_write_buffer_samples(int samples);
56 void set_monitoring(int mode);
61 int done, recording_paused;
62 int grab_result, write_result;
63 int64_t current_sample;
64 int buffer_channels, buffer_samples, write_buffer_samples;
65 int channels, writing_file, fragment_samples;
66 int64_t fragment_position;
67 Samples **input, **buffer;
69 Condition *trigger_lock;
70 Condition *pause_record_lock;
71 Condition *record_paused_lock;