r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / adeviceprefs.h
blob797067f910fb6320448de753569df7873626c19e
1 #ifndef ADEVICEPREFS_H
2 #define ADEVICEPREFS_H
4 // Modes
5 #ifndef MODEPLAY
6 #define MODEPLAY 0
7 #define MODERECORD 1
8 #define MODEDUPLEX 2
9 #endif
11 class OSSEnable;
12 class ALSADevice;
14 #include "bitspopup.inc"
15 #include "guicast.h"
16 #include "playbackconfig.inc"
17 #include "preferencesthread.inc"
18 #include "recordconfig.inc"
20 class ADriverMenu;
21 class ADeviceTextBox;
22 class ADeviceIntBox;
23 class ADeviceCheckBox;
25 class ADevicePrefs
27 public:
28 ADevicePrefs(int x,
29 int y,
30 PreferencesWindow *pwindow,
31 PreferencesDialog *dialog,
32 AudioOutConfig *out_config,
33 AudioInConfig *in_config,
34 int mode);
35 ~ADevicePrefs();
37 static int get_h();
38 int update(AudioOutConfig *out_config);
39 int initialize();
40 int delete_objects();
42 PreferencesWindow *pwindow;
44 private:
45 int create_oss_objs();
46 int create_esound_objs();
47 int create_firewire_objs();
48 int create_alsa_objs();
50 int delete_oss_objs();
51 int delete_esound_objs();
52 int delete_firewire_objs();
53 int delete_alsa_objs();
55 // The output config resolved from playback strategy and render engine.
56 AudioOutConfig *out_config;
57 AudioInConfig *in_config;
58 PreferencesDialog *dialog;
59 int driver, mode;
60 int x;
61 int y;
62 ADriverMenu *menu;
63 BC_Title *driver_title, *path_title, *bits_title, *channels_title;
64 BC_Title *server_title, *port_title, *channel_title, *syt_title;
65 OSSEnable *oss_enable[MAXDEVICES];
66 ADeviceTextBox *oss_path[MAXDEVICES];
67 BitsPopup *oss_bits;
68 ADeviceIntBox *oss_channels[MAXDEVICES];
69 ADeviceTextBox *esound_server;
70 ADeviceIntBox *esound_port;
71 ADeviceIntBox *firewire_port;
72 ADeviceIntBox *firewire_channel;
73 ADeviceIntBox *firewire_channels;
74 ADeviceTextBox *firewire_path;
75 ADeviceIntBox *firewire_syt;
76 BC_CheckBox *firewire_use_dv1394;
77 ALSADevice *alsa_device;
78 BitsPopup *alsa_bits;
79 ADeviceIntBox *alsa_channels;
80 ArrayList<BC_ListBoxItem*> *alsa_drivers;
83 class ADriverMenu : public BC_PopupMenu
85 public:
86 ADriverMenu(int x,
87 int y,
88 ADevicePrefs *device_prefs,
89 int do_input,
90 int *output);
91 ~ADriverMenu();
93 void create_objects();
94 char* adriver_to_string(int driver);
96 int do_input;
97 int *output;
98 ADevicePrefs *device_prefs;
99 char string[BCTEXTLEN];
102 class ADriverItem : public BC_MenuItem
104 public:
105 ADriverItem(ADriverMenu *popup, char *text, int driver);
106 ~ADriverItem();
107 int handle_event();
108 ADriverMenu *popup;
109 int driver;
112 class OSSEnable : public BC_CheckBox
114 public:
115 OSSEnable(int x, int y, int *output);
116 int handle_event();
117 int *output;
122 class ADeviceTextBox : public BC_TextBox
124 public:
125 ADeviceTextBox(int x, int y, char *output);
126 int handle_event();
127 char *output;
130 class ADeviceIntBox : public BC_TextBox
132 public:
133 ADeviceIntBox(int x, int y, int *output);
134 int handle_event();
135 int *output;
138 class ADeviceCheckBox : public BC_CheckBox
140 public:
141 ADeviceCheckBox(int x, int y, int *output, char *text);
143 int handle_event();
144 int *output;
147 class ALSADevice : public BC_PopupTextBox
149 public:
150 ALSADevice(PreferencesDialog *dialog,
151 int x,
152 int y,
153 char *output,
154 ArrayList<BC_ListBoxItem*> *devices);
155 ~ALSADevice();
157 int handle_event();
158 char *output;
161 #endif