~ubuntu-branches/ubuntu/lucid/ardour/lucid-proposed

« back to all changes in this revision

Viewing changes to gtk2_ardour/engine_dialog.cc

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2007-07-03 21:42:15 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070703214215-opx5g5d77brop1ub
Tags: 1:2.0.3-1
* New upstream release (Closes: #427739). Note that the source is still
  built without SHLIBS=1, so that the third party libraries shipped with
  the upstream tarball are used, instead of the system libraries (which
  is what the upstream developers recommend). At the moment this is the
  only available workaround to #425507, but we should eventually fix it
  in the relevant system libraries
* Added 70_DARCH patch to prevent setting DARCH=x86 on amd64
* Rebuilt against flac 1.1.4 (Closes: #426634)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <vector>
 
2
 
 
3
#include <gtkmm/stock.h>
 
4
#include <gtkmm2ext/utils.h>
 
5
 
 
6
#include "engine_dialog.h"
 
7
#include "i18n.h"
 
8
 
 
9
using namespace std;
 
10
using namespace Gtk;
 
11
using namespace Gtkmm2ext;
 
12
 
 
13
EngineDialog::EngineDialog ()
 
14
        : ArdourDialog (_("Audio Engine"), false, true),
 
15
          realtime_button (_("Realtime")),
 
16
          no_memory_lock_button (_("Do not lock memory")),
 
17
          unlock_memory_button (_("Unlock memory")),
 
18
          soft_mode_button (_("No zombies")),
 
19
          monitor_button (_("Monitor ports")),
 
20
          force16bit_button (_("Force 16 bit")),
 
21
          hw_monitor_button (_("H/W monitoring")),
 
22
          hw_meter_button (_("H/W metering")),
 
23
          verbose_output_button (_("Verbose output")),
 
24
          basic_packer (2, 2),
 
25
          options_packer (11, 2),
 
26
          device_packer (10, 2)
 
27
{
 
28
        using namespace Notebook_Helpers;
 
29
        Label* label;
 
30
 
 
31
        vector<string> strings;
 
32
 
 
33
        strings.push_back (_("8000Hz"));
 
34
        strings.push_back (_("22050Hz"));
 
35
        strings.push_back (_("44100Hz"));
 
36
        strings.push_back (_("48000Hz"));
 
37
        strings.push_back (_("88200Hz"));
 
38
        strings.push_back (_("96000Hz"));
 
39
        strings.push_back (_("192000Hz"));
 
40
        set_popdown_strings (sample_rate_combo, strings);
 
41
 
 
42
        strings.clear ();
 
43
        strings.push_back ("32");
 
44
        strings.push_back ("64");
 
45
        strings.push_back ("128");
 
46
        strings.push_back ("256");
 
47
        strings.push_back ("512");
 
48
        strings.push_back ("1024");
 
49
        strings.push_back ("2048");
 
50
        strings.push_back ("4096");
 
51
        strings.push_back ("8192");
 
52
        set_popdown_strings (period_size_combo, strings);
 
53
 
 
54
        /* parameters */
 
55
 
 
56
        basic_packer.set_spacings (6);
 
57
 
 
58
        label = manage (new Label (_("Sample Rate")));
 
59
        basic_packer.attach (*label, 0, 1, 0, 1, FILL|EXPAND, (AttachOptions) 0);
 
60
        basic_packer.attach (sample_rate_combo, 1, 2, 0, 1, FILL|EXPAND, (AttachOptions) 0);
 
61
 
 
62
        label = manage (new Label (_("Period Size")));
 
63
        basic_packer.attach (*label, 0, 1, 1, 2, FILL|EXPAND, (AttachOptions) 0);
 
64
        basic_packer.attach (period_size_combo, 1, 2, 1, 2, FILL|EXPAND, (AttachOptions) 0);
 
65
 
 
66
 
 
67
        /* options */
 
68
 
 
69
        options_packer.attach (realtime_button, 0, 1, 0, 1, FILL|EXPAND, (AttachOptions) 0);
 
70
        options_packer.attach (no_memory_lock_button, 0, 1, 1, 2, FILL|EXPAND, (AttachOptions) 0);
 
71
        options_packer.attach (unlock_memory_button, 0, 1, 2, 3, FILL|EXPAND, (AttachOptions) 0);
 
72
        options_packer.attach (monitor_button, 0, 1, 3, 4, FILL|EXPAND, (AttachOptions) 0);
 
73
        options_packer.attach (soft_mode_button, 0, 1, 4, 5, FILL|EXPAND, (AttachOptions) 0);
 
74
        options_packer.attach (force16bit_button, 0, 1, 5, 6, FILL|EXPAND, (AttachOptions) 0);
 
75
        options_packer.attach (hw_monitor_button, 0, 1, 6, 7, FILL|EXPAND, (AttachOptions) 0);
 
76
        options_packer.attach (hw_meter_button, 0, 1, 7, 8, FILL|EXPAND, (AttachOptions) 0);
 
77
        options_packer.attach (verbose_output_button, 0, 1, 8, 9, FILL|EXPAND, (AttachOptions) 0);
 
78
        options_packer.attach (priority_spinner, 0, 1, 9, 10, FILL|EXPAND, (AttachOptions) 0);
 
79
        options_packer.attach (periods_spinner, 0, 1, 10, 11, FILL|EXPAND, (AttachOptions) 0);
 
80
 
 
81
        /* device */
 
82
 
 
83
        device_packer.set_spacings (6);
 
84
 
 
85
        strings.clear ();
 
86
#ifndef __APPLE
 
87
        strings.push_back (X_("ALSA"));
 
88
        strings.push_back (X_("OSS"));
 
89
        strings.push_back (X_("FFADO"));
 
90
#else
 
91
        strings.push_back (X_("CoreAudio"));
 
92
#endif
 
93
        strings.push_back (X_("NetJACK"));
 
94
        strings.push_back (X_("Dummy"));
 
95
        set_popdown_strings (driver_combo, strings);
 
96
        driver_combo.set_active_text (strings.front());
 
97
 
 
98
        strings.clear ();
 
99
        strings.push_back (_("Duplex"));
 
100
        strings.push_back (_("Playback only"));
 
101
        strings.push_back (_("Capture only"));
 
102
        set_popdown_strings (audio_mode_combo, strings);
 
103
        audio_mode_combo.set_active_text (strings.front());
 
104
 
 
105
        label = manage (new Label (_("Driver")));
 
106
        device_packer.attach (*label, 0, 1, 0, 1, FILL|EXPAND, (AttachOptions) 0);
 
107
        device_packer.attach (driver_combo, 1, 2, 0, 1, FILL|EXPAND, (AttachOptions) 0);
 
108
        label = manage (new Label (_("Interface")));
 
109
        device_packer.attach (*label, 0, 1, 1, 2, FILL|EXPAND, (AttachOptions) 0);
 
110
        device_packer.attach (interface_combo, 1, 2, 1, 2, FILL|EXPAND, (AttachOptions) 0);
 
111
        label = manage (new Label (_("Audio Mode")));
 
112
        device_packer.attach (*label, 0, 1, 2, 3, FILL|EXPAND, (AttachOptions) 0);
 
113
        device_packer.attach (audio_mode_combo, 1, 2, 2, 3, FILL|EXPAND, (AttachOptions) 0);
 
114
        label = manage (new Label (_("Input device")));
 
115
        device_packer.attach (*label, 0, 1, 3, 4, FILL|EXPAND, (AttachOptions) 0);
 
116
        device_packer.attach (input_device_combo, 1, 2, 3, 4, FILL|EXPAND, (AttachOptions) 0);
 
117
        label = manage (new Label (_("Output device")));
 
118
        device_packer.attach (*label, 0, 1, 4, 5, FILL|EXPAND, (AttachOptions) 0);
 
119
        device_packer.attach (output_device_combo, 1, 2, 4, 5, FILL|EXPAND, (AttachOptions) 0); 
 
120
        label = manage (new Label (_("Input channels")));
 
121
        device_packer.attach (*label, 0, 1, 5, 6, FILL|EXPAND, (AttachOptions) 0);
 
122
        device_packer.attach (input_channels, 1, 2, 5, 6, FILL|EXPAND, (AttachOptions) 0);
 
123
        label = manage (new Label (_("Output channels")));
 
124
        device_packer.attach (*label, 0, 1, 6, 7, FILL|EXPAND, (AttachOptions) 0);
 
125
        device_packer.attach (output_channels, 1, 2, 6, 7, FILL|EXPAND, (AttachOptions) 0);
 
126
        label = manage (new Label (_("Input latency")));
 
127
        device_packer.attach (*label, 0, 1, 7, 8, FILL|EXPAND, (AttachOptions) 0);
 
128
        device_packer.attach (input_latency, 1, 2, 7, 8, FILL|EXPAND, (AttachOptions) 0);
 
129
        label = manage (new Label (_("Output latency")));
 
130
        device_packer.attach (*label, 0, 1, 8, 9, FILL|EXPAND, (AttachOptions) 0);
 
131
        device_packer.attach (output_latency, 1, 2, 8, 9, FILL|EXPAND, (AttachOptions) 0);
 
132
 
 
133
        notebook.pages().push_back (TabElem (basic_packer, _("Parameters")));
 
134
        notebook.pages().push_back (TabElem (options_packer, _("Options")));
 
135
        notebook.pages().push_back (TabElem (device_packer, _("Device")));
 
136
 
 
137
        get_vbox()->set_border_width (12);
 
138
        get_vbox()->pack_start (notebook);
 
139
 
 
140
        add_button (Stock::OK, RESPONSE_ACCEPT);
 
141
}
 
142
 
 
143
EngineDialog::~EngineDialog ()
 
144
{
 
145
 
 
146
}