1 #include "adeviceprefs.h"
2 #include "audioconfig.h"
3 #include "audioinprefs.h"
6 #include "edlsession.h"
8 #include "preferences.h"
9 #include "recordconfig.h"
10 #include "vdeviceprefs.h"
12 AudioInPrefs::AudioInPrefs(MWindow *mwindow, PreferencesWindow *pwindow)
13 : PreferencesDialog(mwindow, pwindow)
15 this->mwindow = mwindow;
18 AudioInPrefs::~AudioInPrefs()
24 int AudioInPrefs::create_objects()
29 add_subwindow(new BC_Title(x, y, "Audio In", LARGEFONT, BLACK));
33 add_subwindow(new BC_Title(x, y, "Record Driver:", MEDIUMFONT, BLACK));
34 in_device = new ADevicePrefs(x + 110,
39 pwindow->thread->edl->session->aconfig_in,
41 in_device->initialize();
43 y += ADevicePrefs::get_h();
45 add_subwindow(new BC_Title(x, y, "Duplex Driver:", MEDIUMFONT, BLACK));
46 duplex_device = new ADevicePrefs(x + 110,
50 pwindow->thread->edl->session->aconfig_duplex,
53 duplex_device->initialize();
55 y += ADevicePrefs::get_h();
57 add_subwindow(new BC_Title(x, y, "Samples to write to disk at a time:"));
58 sprintf(string, "%lld", pwindow->thread->edl->session->record_write_length);
59 add_subwindow(textbox = new RecordWriteLength(mwindow, pwindow, x + 240, y, string));
62 add_subwindow(new BC_Title(x, y, "Be sure to allocate enough samples to allow video compression."));
64 add_subwindow(new DuplexEnable(mwindow, pwindow, x, y, pwindow->thread->edl->session->enable_duplex));
66 add_subwindow(new RecordRealTime(mwindow, pwindow, x, y, pwindow->thread->edl->session->real_time_record));
74 RecordWriteLength::RecordWriteLength(MWindow *mwindow, PreferencesWindow *pwindow, int x, int y, char *text)
75 : BC_TextBox(x, y, 100, 1, text)
77 this->pwindow = pwindow;
80 int RecordWriteLength::handle_event()
82 pwindow->thread->edl->session->record_write_length = atol(get_text());
88 RecordRealTime::RecordRealTime(MWindow *mwindow, PreferencesWindow *pwindow, int x, int y, int value)
89 : BC_CheckBox(x, y, value, "Record in realtime priority (root only)")
91 this->pwindow = pwindow;
94 int RecordRealTime::handle_event()
96 pwindow->thread->edl->session->real_time_record = get_value();
99 DuplexEnable::DuplexEnable(MWindow *mwindow, PreferencesWindow *pwindow, int x, int y, int value)
100 : BC_CheckBox(x, y, value, "Enable full duplex")
101 { this->pwindow = pwindow; }
103 int DuplexEnable::handle_event()
105 pwindow->thread->edl->session->enable_duplex = get_value();