123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- $OpenBSD: patch-gtk2_ardour_engine_dialog_cc,v 1.2 2015/12/17 23:14:52 ajacoutot Exp $
- --- gtk2_ardour/engine_dialog.cc.orig Fri Dec 18 00:14:23 2015
- +++ gtk2_ardour/engine_dialog.cc Fri Dec 18 00:14:23 2015
- @@ -14,7 +14,7 @@
- #include <CoreFoundation/CFString.h>
- #include <sys/param.h>
- #include <mach-o/dyld.h>
- -#else
- +#elif defined(__linux__)
- #include <alsa/asoundlib.h>
- #endif
-
- @@ -115,6 +115,8 @@ EngineControl::EngineControl ()
- strings.clear ();
- #ifdef __APPLE__
- strings.push_back (X_("CoreAudio"));
- +#elif defined(__OpenBSD__)
- + strings.push_back (X_("sndio"));
- #else
- strings.push_back (X_("ALSA"));
- strings.push_back (X_("OSS"));
- @@ -130,7 +132,9 @@ EngineControl::EngineControl ()
-
- strings.clear ();
- strings.push_back (_("Playback/Recording on 1 Device"));
- +#ifndef __OpenBSD__
- strings.push_back (_("Playback/Recording on 2 Devices"));
- +#endif
- strings.push_back (_("Playback only"));
- strings.push_back (_("Recording only"));
- set_popdown_strings (audio_mode_combo, strings);
- @@ -161,7 +165,7 @@ EngineControl::EngineControl ()
- basic_packer.attach (period_size_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
- row++;
-
- -#ifndef __APPLE__
- +#if !defined(__APPLE__) && !defined(__OpenBSD__)
- label = manage (new Label (_("Number of buffers")));
- basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
- basic_packer.attach (periods_spinner, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
- @@ -182,7 +186,7 @@ EngineControl::EngineControl ()
- row++;
- /* no audio mode with CoreAudio, its duplex or nuthin' */
-
- -#ifndef __APPLE__
- +#if !defined(__APPLE__) && !defined(__OpenBSD__)
- label = manage (new Label (_("Audio Mode")));
- basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
- basic_packer.attach (audio_mode_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
- @@ -222,7 +226,7 @@ EngineControl::EngineControl ()
- realtime_button.signal_toggled().connect (mem_fun (*this, &EngineControl::realtime_changed));
- realtime_changed ();
-
- -#ifndef __APPLE__
- +#if !defined(__APPLE__) && !defined(__OpenBSD__)
- label = manage (new Label (_("Realtime Priority")));
- label->set_alignment (1.0, 0.5);
- options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
- @@ -272,7 +276,7 @@ EngineControl::EngineControl ()
- options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
- ++row;
-
- -#ifndef __APPLE__
- +#if !defined(__APPLE__) && !defined(__OpenBSD__)
- label = manage (new Label (_("Dither")));
- label->set_alignment (1.0, 0.5);
- options_packer.attach (dither_mode_combo, 1, 2, row, row + 1, FILL|EXPAND, AttachOptions(0));
- @@ -288,7 +292,7 @@ EngineControl::EngineControl ()
- device_packer.set_spacings (6);
- row = 0;
-
- -#ifndef __APPLE__
- +#if !defined(__APPLE__) && !defined(__OpenBSD__)
- label = manage (new Label (_("Input device")));
- label->set_alignment (1.0, 0.5);
- device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
- @@ -432,6 +436,8 @@ EngineControl::build_command_line (vector<string>& cmd
- } else if (driver == X_("CoreAudio")) {
- using_coreaudio = true;
- cmd.push_back ("coreaudio");
- + } else if (driver == X_("sndio")) {
- + cmd.push_back ("sndio");
- } else if (driver == X_("NetJACK")) {
- using_netjack = true;
- cmd.push_back ("netjack");
- @@ -612,7 +618,7 @@ EngineControl::setup_engine ()
- void
- EngineControl::realtime_changed ()
- {
- -#ifndef __APPLE__
- +#if !defined(__APPLE__) && !defined(__OpenBSD__)
- priority_spinner.set_sensitive (realtime_button.get_active());
- #endif
- }
- @@ -627,7 +633,12 @@ EngineControl::enumerate_devices (const string& driver
- devices[driver] = enumerate_coreaudio_devices ();
- #endif
-
- -#ifndef __APPLE__
- +#ifdef __OpenBSD__
- + } else if (driver == "sndio") {
- + devices[driver] = enumerate_sndio_devices ();
- +#endif
- +
- +#ifdef __linux__
- } else if (driver == "ALSA") {
- devices[driver] = enumerate_alsa_devices ();
- } else if (driver == "FFADO") {
- @@ -752,6 +763,17 @@ Ardour and choose the relevant device then."
- exit (1);
- }
-
- +
- + return devs;
- +}
- +#elif defined(__OpenBSD__)
- +vector<string>
- +EngineControl::enumerate_sndio_devices ()
- +{
- + vector<string> devs;
- +
- + backend_devs.clear ();
- + devs.push_back ("default");
-
- return devs;
- }
|