r121: This commit was manufactured by cvs2svn to create tag
[cinelerra_cv/mob.git] / hvirtual / cinelerra / adeviceprefs.h
blobc31fc7c53914e494f19ac8eff6fd3f8ebc84b805
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;
24 class ADevicePrefs
26 public:
27 ADevicePrefs(int x,
28 int y,
29 PreferencesWindow *pwindow,
30 PreferencesDialog *dialog,
31 AudioOutConfig *out_config,
32 AudioInConfig *in_config,
33 int mode);
34 ~ADevicePrefs();
36 static int get_h();
37 int update(AudioOutConfig *out_config);
38 int initialize();
39 int delete_objects();
41 PreferencesWindow *pwindow;
43 private:
44 int create_oss_objs();
45 int create_esound_objs();
46 int create_firewire_objs();
47 int create_alsa_objs();
49 int delete_oss_objs();
50 int delete_esound_objs();
51 int delete_firewire_objs();
52 int delete_alsa_objs();
54 // The output config resolved from playback strategy and render engine.
55 AudioOutConfig *out_config;
56 AudioInConfig *in_config;
57 PreferencesDialog *dialog;
58 int driver, mode;
59 int x;
60 int y;
61 ADriverMenu *menu;
62 BC_Title *driver_title, *path_title, *bits_title, *channels_title;
63 BC_Title *server_title, *port_title, *channel_title, *syt_title;
64 OSSEnable *oss_enable[MAXDEVICES];
65 ADeviceTextBox *oss_path[MAXDEVICES];
66 BitsPopup *oss_bits;
67 ADeviceIntBox *oss_channels[MAXDEVICES];
68 ADeviceTextBox *esound_server;
69 ADeviceIntBox *esound_port;
70 ADeviceIntBox *firewire_port;
71 ADeviceIntBox *firewire_channel;
72 ADeviceIntBox *firewire_channels;
73 ADeviceTextBox *firewire_path;
74 ADeviceIntBox *firewire_syt;
75 ALSADevice *alsa_device;
76 BitsPopup *alsa_bits;
77 ADeviceIntBox *alsa_channels;
78 ArrayList<BC_ListBoxItem*> *alsa_drivers;
81 class ADriverMenu : public BC_PopupMenu
83 public:
84 ADriverMenu(int x,
85 int y,
86 ADevicePrefs *device_prefs,
87 int do_input,
88 int *output);
89 ~ADriverMenu();
91 void create_objects();
92 char* adriver_to_string(int driver);
94 int do_input;
95 int *output;
96 ADevicePrefs *device_prefs;
97 char string[BCTEXTLEN];
100 class ADriverItem : public BC_MenuItem
102 public:
103 ADriverItem(ADriverMenu *popup, char *text, int driver);
104 ~ADriverItem();
105 int handle_event();
106 ADriverMenu *popup;
107 int driver;
110 class OSSEnable : public BC_CheckBox
112 public:
113 OSSEnable(int x, int y, int *output);
114 int handle_event();
115 int *output;
120 class ADeviceTextBox : public BC_TextBox
122 public:
123 ADeviceTextBox(int x, int y, char *output);
124 int handle_event();
125 char *output;
128 class ADeviceIntBox : public BC_TextBox
130 public:
131 ADeviceIntBox(int x, int y, int *output);
132 int handle_event();
133 int *output;
136 class ALSADevice : public BC_PopupTextBox
138 public:
139 ALSADevice(PreferencesDialog *dialog,
140 int x,
141 int y,
142 char *output,
143 ArrayList<BC_ListBoxItem*> *devices);
144 ~ALSADevice();
146 int handle_event();
147 char *output;
150 #endif