mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there
This commit is contained in:
commit
3020b224fa
466 changed files with 10821 additions and 1674 deletions
55
.gitignore
vendored
55
.gitignore
vendored
|
|
@ -79,3 +79,58 @@ tags
|
|||
# /libs/pbd/
|
||||
/libs/pbd/version.cc
|
||||
/libs/pbd/pbd/version.h
|
||||
|
||||
/libs/taglib/taglib/flacproperties.h
|
||||
/libs/taglib/taglib/apefooter.h
|
||||
/libs/taglib/taglib/apeitem.h
|
||||
/libs/taglib/taglib/apetag.h
|
||||
/libs/taglib/taglib/attachedpictureframe.h
|
||||
/libs/taglib/taglib/commentsframe.h
|
||||
/libs/taglib/taglib/flacfile.h
|
||||
/libs/taglib/taglib/id3v2tag.h
|
||||
/libs/taglib/taglib/generalencapsulatedobjectframe.h
|
||||
/libs/taglib/taglib/id3v1genres.h
|
||||
/libs/taglib/taglib/id3v1tag.h
|
||||
/libs/taglib/taglib/id3v2extendedheader.h
|
||||
/libs/taglib/taglib/id3v2footer.h
|
||||
/libs/taglib/taglib/id3v2frame.h
|
||||
/libs/taglib/taglib/id3v2framefactory.h
|
||||
/libs/taglib/taglib/id3v2header.h
|
||||
/libs/taglib/taglib/id3v2synchdata.h
|
||||
/libs/taglib/taglib/oggpageheader.h
|
||||
/libs/taglib/taglib/mpcfile.h
|
||||
/libs/taglib/taglib/mpcproperties.h
|
||||
/libs/taglib/taglib/mpegfile.h
|
||||
/libs/taglib/taglib/mpegheader.h
|
||||
/libs/taglib/taglib/mpegproperties.h
|
||||
/libs/taglib/taglib/oggfile.h
|
||||
/libs/taglib/taglib/oggflacfile.h
|
||||
/libs/taglib/taglib/oggpage.h
|
||||
/libs/taglib/taglib/textidentificationframe.h
|
||||
/libs/taglib/taglib/relativevolumeframe.h
|
||||
/libs/taglib/taglib/speexfile.h
|
||||
/libs/taglib/taglib/speexproperties.h
|
||||
/libs/taglib/taglib/taglib.h
|
||||
/libs/taglib/taglib/tbytevector.h
|
||||
/libs/taglib/taglib/tbytevectorlist.h
|
||||
/libs/taglib/taglib/tdebug.h
|
||||
/libs/taglib/taglib/tlist.h
|
||||
/libs/taglib/taglib/tmap.h
|
||||
/libs/taglib/taglib/trueaudiofile.h
|
||||
/libs/taglib/taglib/trueaudioproperties.h
|
||||
/libs/taglib/taglib/tstring.h
|
||||
/libs/taglib/taglib/tstringlist.h
|
||||
/libs/taglib/taglib/tfile.h
|
||||
/libs/taglib/taglib/urllinkframe.h
|
||||
/libs/taglib/taglib/unicode.h
|
||||
/libs/taglib/taglib/uniquefileidentifierframe.h
|
||||
/libs/taglib/taglib/unknownframe.h
|
||||
/libs/taglib/taglib/unsynchronizedlyricsframe.h
|
||||
/libs/taglib/taglib/xiphcomment.h
|
||||
/libs/taglib/taglib/vorbisfile.h
|
||||
/libs/taglib/taglib/vorbisproperties.h
|
||||
/libs/taglib/taglib/wavpackfile.h
|
||||
/libs/taglib/taglib/wavpackproperties.h
|
||||
/libs/taglib/taglib/xingheader.h
|
||||
/libs/taglib/taglib/tlist.tcc
|
||||
/libs/taglib/taglib/tmap.tcc
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
#include <algorithm>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
#include <cstdlib>
|
||||
|
|
@ -265,7 +264,7 @@ patent must be licensed for everyone's free use or not licensed at all.\n\
|
|||
The precise terms and conditions for copying, distribution and\n\
|
||||
modification follow.\n\
|
||||
\n\
|
||||
GNU GENERAL PUBLIC LICENSE\n\
|
||||
"" GNU GENERAL PUBLIC LICENSE\n\
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\
|
||||
\n\
|
||||
0. This License applies to any program or other work which contains\n\
|
||||
|
|
@ -547,7 +546,9 @@ proprietary programs. If your program is a subroutine library, you may\n\
|
|||
consider it more useful to permit linking proprietary applications with the\n\
|
||||
library. If this is what you want to do, use the GNU Library General\n\
|
||||
Public License instead of this License.\n\
|
||||
");
|
||||
"); /* Note that at the start of (approximately) line 265, the above license
|
||||
text has been split into two concatenated tokens (to satisfy compilation
|
||||
under MSVC). Hopefully this won't affect gcc */
|
||||
|
||||
About::About ()
|
||||
: config_info (0)
|
||||
|
|
@ -561,7 +562,7 @@ About::About ()
|
|||
|
||||
std::string splash_file;
|
||||
|
||||
SearchPath spath(ardour_data_search_path());
|
||||
Searchpath spath(ardour_data_search_path());
|
||||
|
||||
if (find_file_in_search_path (spath, "splash.png", splash_file)) {
|
||||
set_logo (Gdk::Pixbuf::create_from_file (splash_file));
|
||||
|
|
|
|||
|
|
@ -27,15 +27,18 @@
|
|||
#include <cerrno>
|
||||
#include <fstream>
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <sys/resource.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include <gtkmm/messagedialog.h>
|
||||
#include <gtkmm/accelmap.h>
|
||||
|
|
@ -48,6 +51,7 @@
|
|||
#include "pbd/memento_command.h"
|
||||
#include "pbd/openuri.h"
|
||||
#include "pbd/file_utils.h"
|
||||
#include "pbd/localtime_r.h"
|
||||
|
||||
#include "gtkmm2ext/application.h"
|
||||
#include "gtkmm2ext/bindings.h"
|
||||
|
|
@ -293,7 +297,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
|
||||
/* and ambiguous files */
|
||||
|
||||
ARDOUR::FileSource::AmbiguousFileName.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::ambiguous_file, this, _1, _2, _3));
|
||||
ARDOUR::FileSource::AmbiguousFileName.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::ambiguous_file, this, _1, _2));
|
||||
|
||||
/* lets get this party started */
|
||||
|
||||
|
|
@ -753,8 +757,9 @@ ARDOUR_UI::starting ()
|
|||
// wait for announce reply from nsm server
|
||||
for ( i = 0; i < 5000; ++i) {
|
||||
nsm->check ();
|
||||
usleep (i);
|
||||
if (nsm->is_active()) {
|
||||
|
||||
Glib::usleep (i);
|
||||
if (nsm->is_active())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -765,8 +770,9 @@ ARDOUR_UI::starting ()
|
|||
// wait for open command from nsm server
|
||||
for ( i = 0; i < 5000; ++i) {
|
||||
nsm->check ();
|
||||
usleep (1000);
|
||||
if (nsm->client_id ()) {
|
||||
|
||||
Glib::usleep (1000);
|
||||
if (nsm->client_id ())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -848,7 +854,7 @@ ARDOUR_UI::starting ()
|
|||
void
|
||||
ARDOUR_UI::check_memory_locking ()
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(PLATFORM_WINDOWS)
|
||||
/* OS X doesn't support mlockall(2), and so testing for memory locking capability there is pointless */
|
||||
return;
|
||||
#else // !__APPLE__
|
||||
|
|
@ -3102,13 +3108,13 @@ require some unused files to continue to exist."));
|
|||
space_adjusted = rep.space;
|
||||
} else if (rep.space < 1000000) {
|
||||
bprefix = _("kilo");
|
||||
space_adjusted = truncf((float)rep.space / 1000.0);
|
||||
space_adjusted = floorf((float)rep.space / 1000.0);
|
||||
} else if (rep.space < 1000000 * 1000) {
|
||||
bprefix = _("mega");
|
||||
space_adjusted = truncf((float)rep.space / (1000.0 * 1000.0));
|
||||
space_adjusted = floorf((float)rep.space / (1000.0 * 1000.0));
|
||||
} else {
|
||||
bprefix = _("giga");
|
||||
space_adjusted = truncf((float)rep.space / (1000.0 * 1000 * 1000.0));
|
||||
space_adjusted = floorf((float)rep.space / (1000.0 * 1000 * 1000.0));
|
||||
}
|
||||
|
||||
if (msg_delete) {
|
||||
|
|
@ -3453,16 +3459,24 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg)
|
|||
std::string icsd_docroot = video_server_dialog->get_docroot();
|
||||
if (icsd_docroot.empty()) {icsd_docroot = X_("/");}
|
||||
|
||||
struct stat sb;
|
||||
if (!lstat (icsd_docroot.c_str(), &sb) == 0 || !S_ISDIR(sb.st_mode)) {
|
||||
GStatBuf sb;
|
||||
if (!g_lstat (icsd_docroot.c_str(), &sb) == 0 || !S_ISDIR(sb.st_mode)) {
|
||||
warning << _("Specified docroot is not an existing directory.") << endmsg;
|
||||
continue;
|
||||
}
|
||||
if ( (!lstat (icsd_exec.c_str(), &sb) == 0)
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
if ( (!g_lstat (icsd_exec.c_str(), &sb) == 0)
|
||||
|| (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0 ) {
|
||||
warning << _("Given Video Server is not an executable file.") << endmsg;
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
if ( (!g_lstat (icsd_exec.c_str(), &sb) == 0)
|
||||
|| (sb.st_mode & (S_IXUSR)) == 0 ) {
|
||||
warning << _("Given Video Server is not an executable file.") << endmsg;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
char **argp;
|
||||
argp=(char**) calloc(9,sizeof(char*));
|
||||
|
|
@ -3498,7 +3512,7 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg)
|
|||
}
|
||||
int timeout = 120; // 6 sec
|
||||
while (!ARDOUR_UI::instance()->video_timeline->check_server()) {
|
||||
usleep (50000);
|
||||
Glib::usleep (50000);
|
||||
if (--timeout <= 0 || !video_server_process->is_running()) break;
|
||||
}
|
||||
if (timeout <= 0) {
|
||||
|
|
@ -4126,7 +4140,7 @@ ARDOUR_UI::missing_file (Session*s, std::string str, DataType type)
|
|||
}
|
||||
|
||||
int
|
||||
ARDOUR_UI::ambiguous_file (std::string file, std::string /*path*/, std::vector<std::string> hits)
|
||||
ARDOUR_UI::ambiguous_file (std::string file, std::vector<std::string> hits)
|
||||
{
|
||||
AmbiguousFileDialog dialog (file, hits);
|
||||
|
||||
|
|
|
|||
|
|
@ -66,30 +66,37 @@
|
|||
|
||||
#include "video_timeline.h"
|
||||
|
||||
#include "about.h"
|
||||
#include "ardour_button.h"
|
||||
#include "ardour_dialog.h"
|
||||
#include "ardour_window.h"
|
||||
#include "editing.h"
|
||||
#include "engine_dialog.h"
|
||||
#include "meterbridge.h"
|
||||
#include "ui_config.h"
|
||||
#include "enums.h"
|
||||
#include "visibility_group.h"
|
||||
#include "window_manager.h"
|
||||
|
||||
class About;
|
||||
class AddRouteDialog;
|
||||
class AddVideoDialog;
|
||||
#include "add_route_dialog.h"
|
||||
#include "add_video_dialog.h"
|
||||
#include "big_clock_window.h"
|
||||
#include "bundle_manager.h"
|
||||
#include "global_port_matrix.h"
|
||||
#include "keyeditor.h"
|
||||
#include "location_ui.h"
|
||||
#include "rc_option_editor.h"
|
||||
#include "route_params_ui.h"
|
||||
#include "session_option_editor.h"
|
||||
#include "speaker_dialog.h"
|
||||
#include "theme_manager.h"
|
||||
|
||||
class VideoTimeLine;
|
||||
class SystemExec;
|
||||
class ArdourKeyboard;
|
||||
class AudioClock;
|
||||
class BigClockWindow;
|
||||
class BundleManager;
|
||||
class ButtonJoiner;
|
||||
class ConnectionEditor;
|
||||
class EngineControl;
|
||||
class KeyEditor;
|
||||
class LocationUIWindow;
|
||||
class MainClock;
|
||||
class Mixer_UI;
|
||||
class PublicEditor;
|
||||
|
|
@ -99,13 +106,10 @@ class SessionDialog;
|
|||
class SessionOptionEditor;
|
||||
class ShuttleControl;
|
||||
class Splash;
|
||||
class SpeakerDialog;
|
||||
class ThemeManager;
|
||||
class TimeInfoBox;
|
||||
class MidiTracer;
|
||||
class NSM_Client;
|
||||
class LevelMeterHBox;
|
||||
class GlobalPortMatrixWindow;
|
||||
class GUIObjectState;
|
||||
|
||||
namespace Gtkmm2ext {
|
||||
|
|
@ -721,7 +725,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void fontconfig_dialog ();
|
||||
|
||||
int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
|
||||
int ambiguous_file (std::string file, std::string path, std::vector<std::string> hits);
|
||||
int ambiguous_file (std::string file, std::vector<std::string> hits);
|
||||
|
||||
bool click_button_clicked (GdkEventButton *);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@
|
|||
#include "ardour/audioengine.h"
|
||||
#include "ardour/automation_watch.h"
|
||||
|
||||
#ifdef interface
|
||||
#undef interface
|
||||
#endif
|
||||
|
||||
#include "actions.h"
|
||||
#include "add_route_dialog.h"
|
||||
#include "add_video_dialog.h"
|
||||
|
|
|
|||
|
|
@ -1131,7 +1131,7 @@ AudioClock::set_minsec (framepos_t when, bool /*force*/)
|
|||
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
|
||||
left -= (framecnt_t) floor (mins * _session->frame_rate() * 60.0f);
|
||||
secs = (int) floor (left / (float) _session->frame_rate());
|
||||
left -= (framecnt_t) floor (secs * _session->frame_rate());
|
||||
left -= (framecnt_t) floor ((double)(secs * _session->frame_rate()));
|
||||
millisecs = floor (left * 1000.0 / (float) _session->frame_rate());
|
||||
|
||||
if (negative) {
|
||||
|
|
@ -1742,7 +1742,7 @@ AudioClock::on_motion_notify_event (GdkEventMotion *ev)
|
|||
|
||||
drag_y = ev->y;
|
||||
|
||||
if (trunc (drag_accum) != 0) {
|
||||
if (floor (drag_accum) != 0) {
|
||||
|
||||
framepos_t frames;
|
||||
framepos_t pos;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@ AudioRegionEditor::AudioRegionEditor (Session* s, boost::shared_ptr<AudioRegion>
|
|||
: RegionEditor (s, r)
|
||||
, _audio_region (r)
|
||||
, gain_adjustment(accurate_coefficient_to_dB(_audio_region->scale_amplitude()), -40.0, +40.0, 0.1, 1.0, 0)
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
, _peak_channel (false)
|
||||
#endif
|
||||
{
|
||||
|
||||
Gtk::HBox* b = Gtk::manage (new Gtk::HBox);
|
||||
|
|
@ -91,7 +93,7 @@ AudioRegionEditor::AudioRegionEditor (Session* s, boost::shared_ptr<AudioRegion>
|
|||
|
||||
PeakAmplitudeFound.connect (_peak_amplitude_connection, invalidator (*this), boost::bind (&AudioRegionEditor::peak_amplitude_found, this, _1), gui_context ());
|
||||
pthread_create_and_store (X_("peak-amplitude"), &_peak_amplitude_thread_handle, _peak_amplitude_thread, this);
|
||||
_peak_channel.deliver ('c');
|
||||
signal_peak_thread ();
|
||||
}
|
||||
|
||||
AudioRegionEditor::~AudioRegionEditor ()
|
||||
|
|
@ -112,7 +114,7 @@ AudioRegionEditor::region_changed (const PBD::PropertyChange& what_changed)
|
|||
|
||||
if (what_changed.contains (ARDOUR::Properties::start) || what_changed.contains (ARDOUR::Properties::length)) {
|
||||
/* ask the peak thread to run again */
|
||||
_peak_channel.deliver ('c');
|
||||
signal_peak_thread ();
|
||||
}
|
||||
}
|
||||
void
|
||||
|
|
@ -133,13 +135,33 @@ AudioRegionEditor::gain_adjustment_changed ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::signal_peak_thread ()
|
||||
{
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
m_peak_sem.post ();
|
||||
#else
|
||||
_peak_channel.deliver ('c');
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::wait_for_signal ()
|
||||
{
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
m_peak_sem.wait ();
|
||||
#else
|
||||
char msg;
|
||||
_peak_channel.receive (msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::peak_amplitude_thread ()
|
||||
{
|
||||
while (1) {
|
||||
/* await instructions to run */
|
||||
char msg;
|
||||
_peak_channel.receive (msg);
|
||||
wait_for_signal ();
|
||||
|
||||
/* compute peak amplitude and signal the fact */
|
||||
PeakAmplitudeFound (accurate_coefficient_to_dB (_audio_region->maximum_amplitude ())); /* EMIT SIGNAL */
|
||||
|
|
|
|||
|
|
@ -36,7 +36,11 @@
|
|||
|
||||
|
||||
#include "pbd/signals.h"
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#include "pbd/glib_semaphore.h"
|
||||
#else
|
||||
#include "pbd/crossthread.h"
|
||||
#endif
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "ardour_dialog.h"
|
||||
|
|
@ -73,11 +77,17 @@ class AudioRegionEditor : public RegionEditor
|
|||
Gtk::Label _peak_amplitude_label;
|
||||
Gtk::Entry _peak_amplitude;
|
||||
|
||||
void signal_peak_thread ();
|
||||
void wait_for_signal ();
|
||||
pthread_t _peak_amplitude_thread_handle;
|
||||
void peak_amplitude_found (double);
|
||||
PBD::Signal1<void, double> PeakAmplitudeFound;
|
||||
PBD::ScopedConnection _peak_amplitude_connection;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
PBD::GlibSemaphore m_peak_sem;
|
||||
#else
|
||||
CrossThreadChannel _peak_channel;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* __gtk_ardour_audio_region_edit_h__ */
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include <cmath>
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/scoped_array.hpp>
|
||||
|
||||
|
|
@ -561,9 +562,9 @@ AudioRegionView::reset_fade_in_shape_width (boost::shared_ptr<AudioRegion> ar, f
|
|||
|
||||
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
|
||||
double effective_height;
|
||||
float curve[npoints];
|
||||
std::vector<float> curve(npoints);
|
||||
|
||||
audio_region()->fade_in()->curve().get_vector (0, audio_region()->fade_in()->back()->when, curve, npoints);
|
||||
audio_region()->fade_in()->curve().get_vector (0, audio_region()->fade_in()->back()->when, &curve[0], npoints);
|
||||
|
||||
if (_height >= NAME_HIGHLIGHT_THRESH) {
|
||||
effective_height = _height - NAME_HIGHLIGHT_SIZE - 1;
|
||||
|
|
@ -639,9 +640,9 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar,
|
|||
|
||||
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
|
||||
double effective_height;
|
||||
float curve[npoints];
|
||||
std::vector<float> curve(npoints);
|
||||
|
||||
audio_region()->fade_out()->curve().get_vector (0, audio_region()->fade_out()->back()->when, curve, npoints);
|
||||
audio_region()->fade_out()->curve().get_vector (0, audio_region()->fade_out()->back()->when, &curve[0], npoints);
|
||||
|
||||
if (_height >= NAME_HIGHLIGHT_THRESH) {
|
||||
effective_height = _height - (NAME_HIGHLIGHT_SIZE + 1); /* skip the top pixel that shows the frame of this regionview */
|
||||
|
|
@ -762,8 +763,8 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr<AudioRegion> ar, frame
|
|||
|
||||
} else {
|
||||
|
||||
float vec[npoints];
|
||||
inverse->curve().get_vector (0, inverse->back()->when, vec, npoints);
|
||||
std::vector<float> vec(npoints);
|
||||
inverse->curve().get_vector (0, inverse->back()->when, &vec[0], npoints);
|
||||
|
||||
for (Points::size_type i = 0, pci = 0; i < npoints; ++i, ++pci) {
|
||||
ArdourCanvas::Duple &p (ipoints[pci]);
|
||||
|
|
@ -1256,7 +1257,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
|
|||
}
|
||||
|
||||
void
|
||||
AudioRegionView::remove_gain_point_event (ArdourCanvas::Item *item, GdkEvent */*ev*/)
|
||||
AudioRegionView::remove_gain_point_event (ArdourCanvas::Item *item, GdkEvent* /*ev*/)
|
||||
{
|
||||
ControlPoint *cp = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"));
|
||||
audio_region()->envelope()->erase (cp->model());
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@
|
|||
#ifndef __gtk_ardour_audio_region_view_h__
|
||||
#define __gtk_ardour_audio_region_view_h__
|
||||
|
||||
#ifdef interface
|
||||
#undef interface
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <sigc++/signal.h>
|
||||
|
|
|
|||
|
|
@ -385,19 +385,19 @@ AudioTimeAxisView::build_automation_action_menu (bool for_selection)
|
|||
MenuList& automation_items = automation_action_menu->items ();
|
||||
|
||||
automation_items.push_back (CheckMenuElem (_("Fader"), sigc::mem_fun (*this, &AudioTimeAxisView::update_gain_track_visibility)));
|
||||
gain_automation_item = dynamic_cast<CheckMenuItem*> (&automation_items.back ());
|
||||
gain_automation_item = dynamic_cast<Gtk::CheckMenuItem*> (&automation_items.back ());
|
||||
gain_automation_item->set_active ((!for_selection || _editor.get_selection().tracks.size() == 1) &&
|
||||
(gain_track && string_is_affirmative (gain_track->gui_property ("visible"))));
|
||||
|
||||
_main_automation_menu_map[Evoral::Parameter(GainAutomation)] = gain_automation_item;
|
||||
|
||||
automation_items.push_back (CheckMenuElem (_("Pan"), sigc::mem_fun (*this, &AudioTimeAxisView::update_pan_track_visibility)));
|
||||
pan_automation_item = dynamic_cast<CheckMenuItem*> (&automation_items.back ());
|
||||
pan_automation_item = dynamic_cast<Gtk::CheckMenuItem*> (&automation_items.back ());
|
||||
pan_automation_item->set_active ((!for_selection || _editor.get_selection().tracks.size() == 1) &&
|
||||
(!pan_tracks.empty() && string_is_affirmative (pan_tracks.front()->gui_property ("visible"))));
|
||||
|
||||
set<Evoral::Parameter> const & params = _route->pannable()->what_can_be_automated ();
|
||||
for (set<Evoral::Parameter>::iterator p = params.begin(); p != params.end(); ++p) {
|
||||
for (set<Evoral::Parameter>::const_iterator p = params.begin(); p != params.end(); ++p) {
|
||||
_main_automation_menu_map[*p] = pan_automation_item;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,17 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifdef COMPILER_MSVC
|
||||
#include <float.h>
|
||||
|
||||
// 'std::isinf()' and 'std::isnan()' are not available in MSVC.
|
||||
#define isinf(val) !((bool)_finite((double)val))
|
||||
#define isnan(val) (bool)_isnan((double)val)
|
||||
#else
|
||||
using std::isnan;
|
||||
using std::isinf;
|
||||
#endif
|
||||
|
||||
#include <cmath>
|
||||
#include <climits>
|
||||
#include <vector>
|
||||
|
|
@ -949,7 +960,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
|
|||
|
||||
model_to_view_coord (tx, ty);
|
||||
|
||||
if (std::isnan (tx) || std::isnan (ty)) {
|
||||
if (isnan (tx) || isnan (ty)) {
|
||||
warning << string_compose (_("Ignoring illegal points on AutomationLine \"%1\""),
|
||||
_name) << endmsg;
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -489,22 +489,22 @@ AutomationTimeAxisView::build_display_menu ()
|
|||
as_items.push_back (CheckMenuElem (S_("Automation|Manual"), sigc::bind (
|
||||
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
|
||||
(AutoState) ARDOUR::Off)));
|
||||
auto_off_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
|
||||
auto_off_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
|
||||
|
||||
as_items.push_back (CheckMenuElem (_("Play"), sigc::bind (
|
||||
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
|
||||
(AutoState) Play)));
|
||||
auto_play_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
|
||||
auto_play_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
|
||||
|
||||
as_items.push_back (CheckMenuElem (_("Write"), sigc::bind (
|
||||
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
|
||||
(AutoState) Write)));
|
||||
auto_write_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
|
||||
auto_write_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
|
||||
|
||||
as_items.push_back (CheckMenuElem (_("Touch"), sigc::bind (
|
||||
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
|
||||
(AutoState) Touch)));
|
||||
auto_touch_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
|
||||
auto_touch_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
|
||||
|
||||
items.push_back (MenuElem (_("State"), *auto_state_menu));
|
||||
|
||||
|
|
@ -524,13 +524,13 @@ AutomationTimeAxisView::build_display_menu ()
|
|||
am_items.push_back (RadioMenuElem (group, _("Discrete"), sigc::bind (
|
||||
sigc::mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
|
||||
AutomationList::Discrete)));
|
||||
mode_discrete_item = dynamic_cast<CheckMenuItem*>(&am_items.back());
|
||||
mode_discrete_item = dynamic_cast<Gtk::CheckMenuItem*>(&am_items.back());
|
||||
mode_discrete_item->set_active (s == AutomationList::Discrete);
|
||||
|
||||
am_items.push_back (RadioMenuElem (group, _("Linear"), sigc::bind (
|
||||
sigc::mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
|
||||
AutomationList::Linear)));
|
||||
mode_line_item = dynamic_cast<CheckMenuItem*>(&am_items.back());
|
||||
mode_line_item = dynamic_cast<Gtk::CheckMenuItem*>(&am_items.back());
|
||||
mode_line_item->set_active (s == AutomationList::Linear);
|
||||
|
||||
items.push_back (MenuElem (_("Mode"), *auto_mode_menu));
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "audio_clock.h"
|
||||
|
|
@ -138,11 +139,11 @@ BigClockWindow::text_resizer (int, int)
|
|||
if (size != current_size) {
|
||||
|
||||
string family = fd.get_family();
|
||||
char buf[family.length()+16];
|
||||
snprintf (buf, family.length()+16, "%s %d", family.c_str(), size);
|
||||
std::vector<char> buf(family.length()+16);
|
||||
snprintf (&buf[0], family.length()+16, "%s %d", family.c_str(), size);
|
||||
|
||||
try {
|
||||
Pango::FontDescription fd (buf);
|
||||
Pango::FontDescription fd (&buf[0]);
|
||||
Glib::RefPtr<Gtk::RcStyle> rcstyle = clock.get_modifier_style ();
|
||||
rcstyle->set_font (fd);
|
||||
clock.modify_style (rcstyle);
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ BundleManager::BundleManager (Session* session)
|
|||
edit_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::EDIT, Gtk::ICON_SIZE_BUTTON)));
|
||||
edit_button.signal_clicked().connect (sigc::mem_fun (*this, &BundleManager::edit_clicked));
|
||||
buttons->pack_start (edit_button, false, false);
|
||||
delete_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::DELETE, Gtk::ICON_SIZE_BUTTON)));
|
||||
delete_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::StockID(GTK_STOCK_DELETE), Gtk::ICON_SIZE_BUTTON)));
|
||||
delete_button.signal_clicked().connect (sigc::mem_fun (*this, &BundleManager::delete_clicked));
|
||||
buttons->pack_start (delete_button, false, false);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
/* POSIX guarantees casting between void* and function pointers, ISO C doesn't
|
||||
* We can work around warnings by going one step deeper in our casts
|
||||
*/
|
||||
#ifdef _POSIX_VERSION
|
||||
#if defined(_POSIX_VERSION) || defined(COMPILER_MINGW)
|
||||
#define POSIX_FUNC_PTR_CAST(type, object) *((type*) &(object))
|
||||
#endif // _POSIX_VERSION
|
||||
|
||||
|
|
|
|||
|
|
@ -665,7 +665,7 @@ Editor::start_canvas_autoscroll (int dx, int dy)
|
|||
autoscroll_x = dx;
|
||||
autoscroll_y = dy;
|
||||
autoscroll_x_distance = (framepos_t) floor (current_page_samples()/50.0);
|
||||
autoscroll_y_distance = fabs (dy * 5); /* pixels */
|
||||
autoscroll_y_distance = fabs ((double)dy * 5); /* pixels */
|
||||
autoscroll_cnt = 0;
|
||||
|
||||
/* do it right now, which will start the repeated callbacks */
|
||||
|
|
|
|||
|
|
@ -1498,7 +1498,7 @@ RegionCreateDrag::motion (GdkEvent* event, bool first_move)
|
|||
place snapped notes at the start of the region.
|
||||
*/
|
||||
|
||||
framecnt_t const len = (framecnt_t) fabs (f - grab_frame () - 1);
|
||||
framecnt_t const len = (framecnt_t) fabs ((double)(f - grab_frame () - 1));
|
||||
_region->set_length (len < 1 ? 1 : len);
|
||||
}
|
||||
}
|
||||
|
|
@ -4369,7 +4369,7 @@ NoteDrag::motion (GdkEvent *, bool)
|
|||
uint8_t new_note = min (max (_primary->note()->note() + note_delta, 0), 127);
|
||||
|
||||
snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (new_note).c_str(),
|
||||
(int) floor (new_note));
|
||||
(int) floor ((double)new_note));
|
||||
|
||||
show_verbose_cursor_text (buf);
|
||||
}
|
||||
|
|
@ -4873,7 +4873,7 @@ NoteCreateDrag::finished (GdkEvent*, bool had_movement)
|
|||
}
|
||||
|
||||
framepos_t const start = min (_note[0], _note[1]);
|
||||
framecnt_t length = (framecnt_t) fabs (_note[0] - _note[1]);
|
||||
framecnt_t length = (framecnt_t) fabs ((double)(_note[0] - _note[1]));
|
||||
|
||||
framecnt_t const g = grid_frames (start);
|
||||
double const one_tick = 1 / Timecode::BBT_Time::ticks_per_beat;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include <gtkmm/messagedialog.h>
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include "gtkmm2ext/choice.h"
|
||||
|
||||
#include "pbd/pthread_utils.h"
|
||||
|
|
@ -158,11 +160,11 @@ Editor::export_region ()
|
|||
|
||||
switch (ret) {
|
||||
case Gtk::RESPONSE_ACCEPT:
|
||||
/* force unlink because the backend code will
|
||||
/* force ::g_unlink because the backend code will
|
||||
go wrong if it tries to open an existing
|
||||
file for writing.
|
||||
*/
|
||||
::unlink (path.c_str());
|
||||
::g_unlink (path.c_str());
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -860,14 +860,14 @@ Editor::build_marker_menu (Location* loc)
|
|||
items.push_back (MenuElem (_("Rename..."), sigc::mem_fun(*this, &Editor::marker_menu_rename)));
|
||||
|
||||
items.push_back (CheckMenuElem (_("Lock")));
|
||||
CheckMenuItem* lock_item = static_cast<CheckMenuItem*> (&items.back());
|
||||
Gtk::CheckMenuItem* lock_item = static_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
if (loc->locked ()) {
|
||||
lock_item->set_active ();
|
||||
}
|
||||
lock_item->signal_activate().connect (sigc::mem_fun (*this, &Editor::toggle_marker_menu_lock));
|
||||
|
||||
items.push_back (CheckMenuElem (_("Glue to Bars and Beats")));
|
||||
CheckMenuItem* glue_item = static_cast<CheckMenuItem*> (&items.back());
|
||||
Gtk::CheckMenuItem* glue_item = static_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
if (loc->position_lock_style() == MusicTime) {
|
||||
glue_item->set_active ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3477,7 +3477,7 @@ Editor::freeze_route ()
|
|||
|
||||
/* wait for just a little while, because the above call is asynchronous */
|
||||
|
||||
::usleep (250000);
|
||||
Glib::usleep (250000);
|
||||
|
||||
if (clicked_routeview == 0 || !clicked_routeview->is_audio_track()) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -388,11 +388,11 @@ Editor::popup_ruler_menu (framepos_t where, ItemType t)
|
|||
ruler_items.push_back (MenuElem (_("Timeline height")));
|
||||
static_cast<MenuItem*>(&ruler_items.back())->set_sensitive(false);
|
||||
ruler_items.push_back (CheckMenuElem (_("Large"), sigc::bind ( sigc::mem_fun(*this, &Editor::set_video_timeline_height), 6)));
|
||||
if (videotl_bar_height == 6) { static_cast<CheckMenuItem*>(&ruler_items.back())->set_active(true);}
|
||||
if (videotl_bar_height == 6) { static_cast<Gtk::CheckMenuItem*>(&ruler_items.back())->set_active(true);}
|
||||
ruler_items.push_back (CheckMenuElem (_("Normal"), sigc::bind ( sigc::mem_fun(*this, &Editor::set_video_timeline_height), 4)));
|
||||
if (videotl_bar_height == 4) { static_cast<CheckMenuItem*>(&ruler_items.back())->set_active(true);}
|
||||
if (videotl_bar_height == 4) { static_cast<Gtk::CheckMenuItem*>(&ruler_items.back())->set_active(true);}
|
||||
ruler_items.push_back (CheckMenuElem (_("Small"), sigc::bind ( sigc::mem_fun(*this, &Editor::set_video_timeline_height), 3)));
|
||||
if (videotl_bar_height == 3) { static_cast<CheckMenuItem*>(&ruler_items.back())->set_active(true);}
|
||||
if (videotl_bar_height == 3) { static_cast<Gtk::CheckMenuItem*>(&ruler_items.back())->set_active(true);}
|
||||
ruler_items.push_back (SeparatorElem ());
|
||||
|
||||
ruler_items.push_back (MenuElem (_("Align Video Track")));
|
||||
|
|
@ -400,7 +400,7 @@ Editor::popup_ruler_menu (framepos_t where, ItemType t)
|
|||
|
||||
ruler_items.push_back (CheckMenuElem (_("Lock")));
|
||||
{
|
||||
CheckMenuItem* vtl_lock = static_cast<CheckMenuItem*>(&ruler_items.back());
|
||||
Gtk::CheckMenuItem* vtl_lock = static_cast<Gtk::CheckMenuItem*>(&ruler_items.back());
|
||||
vtl_lock->set_active(is_video_timeline_locked());
|
||||
vtl_lock->signal_activate().connect (sigc::mem_fun(*this, &Editor::toggle_video_timeline_locked));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -402,9 +402,12 @@ Editor::timefx_thread (void *arg)
|
|||
by the GUI ...
|
||||
*/
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
Sleep(2000);
|
||||
#else
|
||||
struct timespec t = { 2, 0 };
|
||||
nanosleep (&t, 0);
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include <jack/types.h>
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include "ardour/profile.h"
|
||||
#include "ardour/rc_configuration.h"
|
||||
#include "ardour/audio_track.h"
|
||||
|
|
@ -103,7 +105,7 @@ Editor::embed_audio_from_video (std::string path, framepos_t n, bool lock_positi
|
|||
}
|
||||
|
||||
import_status.all_done = true;
|
||||
unlink(path.c_str());
|
||||
::g_unlink(path.c_str());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -25,6 +25,10 @@
|
|||
|
||||
#include "ardour/export_profile_manager.h"
|
||||
|
||||
#ifdef interface
|
||||
#undef interface
|
||||
#endif
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <sigc++/signal.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ ExportDialog::show_progress ()
|
|||
if (gtk_events_pending()) {
|
||||
gtk_main_iteration ();
|
||||
} else {
|
||||
usleep (10000);
|
||||
Glib::usleep (10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@
|
|||
#include "ardour_dialog.h"
|
||||
#include "audio_clock.h"
|
||||
|
||||
#ifdef interface
|
||||
#undef interface
|
||||
#endif
|
||||
|
||||
#include <gtkmm.h>
|
||||
|
||||
class ExportFormatDialog : public ArdourDialog, public PBD::ScopedConnectionList {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ ExportTimespanSelector::ExportTimespanSelector (ARDOUR::Session * session, Profi
|
|||
option_hbox.pack_start (time_format_label, false, false, 0);
|
||||
option_hbox.pack_start (time_format_combo, false, false, 6);
|
||||
|
||||
Gtk::Button* b = manage (new Gtk::Button (_("Select All")));
|
||||
Gtk::Button* b = Gtk::manage (new Gtk::Button (_("Select All")));
|
||||
b->signal_clicked().connect (
|
||||
sigc::bind (
|
||||
sigc::mem_fun (*this, &ExportTimespanSelector::set_selection_state_of_all_timespans), true
|
||||
|
|
@ -58,7 +58,7 @@ ExportTimespanSelector::ExportTimespanSelector (ARDOUR::Session * session, Profi
|
|||
);
|
||||
option_hbox.pack_start (*b, false, false, 6);
|
||||
|
||||
b = manage (new Gtk::Button (_("Deselect All")));
|
||||
b = Gtk::manage (new Gtk::Button (_("Deselect All")));
|
||||
b->signal_clicked().connect (
|
||||
sigc::bind (
|
||||
sigc::mem_fun (*this, &ExportTimespanSelector::set_selection_state_of_all_timespans), false
|
||||
|
|
@ -305,7 +305,7 @@ ExportTimespanSelector::ms_str (framecnt_t frames) const
|
|||
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
|
||||
left -= (framecnt_t) floor (mins * _session->frame_rate() * 60.0f);
|
||||
secs = (int) floor (left / (float) _session->frame_rate());
|
||||
left -= (framecnt_t) floor (secs * _session->frame_rate());
|
||||
left -= (framecnt_t) floor ((double)(secs * _session->frame_rate()));
|
||||
sec_promilles = (int) (left * 1000 / (float) _session->frame_rate() + 0.5);
|
||||
|
||||
oss << std::setfill('0') << std::right <<
|
||||
|
|
|
|||
|
|
@ -25,9 +25,14 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#ifdef interface
|
||||
#undef interface
|
||||
#endif
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
||||
#include "ardour/types.h"
|
||||
#include "ardour/session_handle.h"
|
||||
#include "ardour/export_profile_manager.h"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
#include <sigc++/bind.h>
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/convert.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
|
|
@ -414,8 +416,8 @@ void
|
|||
ExportVideoDialog::finished ()
|
||||
{
|
||||
if (aborted) {
|
||||
unlink(outfn_path_entry.get_text().c_str());
|
||||
unlink (insnd.c_str());
|
||||
::g_unlink(outfn_path_entry.get_text().c_str());
|
||||
::g_unlink (insnd.c_str());
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
} else if (twopass && firstpass) {
|
||||
firstpass = false;
|
||||
|
|
@ -425,9 +427,9 @@ ExportVideoDialog::finished ()
|
|||
if (twopass_checkbox.get_active()) {
|
||||
std::string outfn = outfn_path_entry.get_text();
|
||||
std::string p2log = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass";
|
||||
unlink (p2log.c_str());
|
||||
::g_unlink (p2log.c_str());
|
||||
}
|
||||
unlink (insnd.c_str());
|
||||
::g_unlink (insnd.c_str());
|
||||
Gtk::Dialog::response(RESPONSE_ACCEPT);
|
||||
}
|
||||
}
|
||||
|
|
@ -570,13 +572,13 @@ ExportVideoDialog::launch_export ()
|
|||
if (gtk_events_pending()) {
|
||||
gtk_main_iteration ();
|
||||
} else {
|
||||
usleep (10000);
|
||||
Glib::usleep (10000);
|
||||
}
|
||||
}
|
||||
audio_progress_connection.disconnect();
|
||||
status->finish ();
|
||||
if (status->aborted()) {
|
||||
unlink (insnd.c_str());
|
||||
::g_unlink (insnd.c_str());
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
}
|
||||
|
|
@ -593,14 +595,14 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
transcoder = new TranscodeFfmpeg(invid);
|
||||
if (!transcoder->ffexec_ok()) {
|
||||
/* ffmpeg binary was not found. TranscodeFfmpeg prints a warning */
|
||||
unlink (insnd.c_str());
|
||||
::g_unlink (insnd.c_str());
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
}
|
||||
if (!transcoder->probe_ok()) {
|
||||
/* video input file can not be read */
|
||||
warning << _("Export Video: Video input file cannot be read.") << endmsg;
|
||||
unlink (insnd.c_str());
|
||||
::g_unlink (insnd.c_str());
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
}
|
||||
|
|
@ -698,7 +700,7 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
ffs["-an"] = "-y";
|
||||
ffs["-passlogfile"] = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass";
|
||||
ffs["-f"] = get_file_extension(invid).empty()?"mov":get_file_extension(invid);
|
||||
#ifdef _OS_WIN32
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
outfn = "NUL";
|
||||
#else
|
||||
outfn = "/dev/null";
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
*/
|
||||
#include "ardour/session.h"
|
||||
#ifdef interface
|
||||
#undef interface
|
||||
#endif
|
||||
#include "export_video_infobox.h"
|
||||
#include "i18n.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifdef COMPILER_MSVC
|
||||
#include <algorithm>
|
||||
using std::min; using std::max;
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <glibmm.h>
|
||||
|
|
@ -287,8 +292,8 @@ FFTGraph::redraw()
|
|||
|
||||
|
||||
// Find "session wide" min & max
|
||||
float min = 1000000000000.0;
|
||||
float max = -1000000000000.0;
|
||||
float minf = 1000000000000.0;
|
||||
float maxf = -1000000000000.0;
|
||||
|
||||
TreeNodeChildren track_rows = _a_window->track_list.get_model()->children();
|
||||
|
||||
|
|
@ -302,18 +307,18 @@ FFTGraph::redraw()
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( res->minimum() < min) {
|
||||
min = res->minimum();
|
||||
if ( res->minimum() < minf) {
|
||||
minf = res->minimum();
|
||||
}
|
||||
|
||||
if ( res->maximum() > max) {
|
||||
max = res->maximum();
|
||||
if ( res->maximum() > maxf) {
|
||||
maxf = res->maximum();
|
||||
}
|
||||
}
|
||||
|
||||
if (!_show_normalized) {
|
||||
min = -150.0f;
|
||||
max = 0.0f;
|
||||
minf = -150.0f;
|
||||
maxf = 0.0f;
|
||||
}
|
||||
|
||||
//int graph_height = height - 2 * h_margin;
|
||||
|
|
@ -323,7 +328,7 @@ FFTGraph::redraw()
|
|||
float fft_pane_size_w = (float)(width - 2*v_margin) - 1.0;
|
||||
float fft_pane_size_h = (float)(height - 2*h_margin);
|
||||
|
||||
double pixels_per_db = (double)fft_pane_size_h / (double)(max - min);
|
||||
double pixels_per_db = (double)fft_pane_size_h / (double)(maxf - minf);
|
||||
|
||||
cairo_rectangle(cr, 0.0, 0.0, fft_pane_size_w, fft_pane_size_h);
|
||||
cairo_clip(cr);
|
||||
|
|
@ -350,14 +355,14 @@ FFTGraph::redraw()
|
|||
mpp = -1000000.0;
|
||||
|
||||
cairo_set_source_rgba(cr, res->get_color().get_red_p(), res->get_color().get_green_p(), res->get_color().get_blue_p(), 0.30);
|
||||
cairo_move_to(cr, 0.5f + (float)_logScale[0], 0.5f + (float)( fft_pane_size_h - (int)floor( (res->maxAt(0) - min) * pixels_per_db) ));
|
||||
cairo_move_to(cr, 0.5f + (float)_logScale[0], 0.5f + (float)( fft_pane_size_h - (int)floor( (res->maxAt(0) - minf) * pixels_per_db) ));
|
||||
|
||||
// Draw the line of maximum values
|
||||
for (int x = 1; x < res->length(); x++) {
|
||||
if (res->maxAt(x) > mpp)
|
||||
mpp = res->maxAt(x);
|
||||
mpp = fmax(mpp, min);
|
||||
mpp = fmin(mpp, max);
|
||||
mpp = fmax(mpp, minf);
|
||||
mpp = fmin(mpp, maxf);
|
||||
|
||||
// If the next point on the log scale is at the same location,
|
||||
// don't draw yet
|
||||
|
|
@ -366,7 +371,7 @@ FFTGraph::redraw()
|
|||
}
|
||||
|
||||
float X = 0.5f + (float)_logScale[x];
|
||||
float Y = 0.5f + (float)( fft_pane_size_h - (int)floor( (mpp - min) * pixels_per_db) );
|
||||
float Y = 0.5f + (float)( fft_pane_size_h - (int)floor( (mpp - minf) * pixels_per_db) );
|
||||
|
||||
cairo_line_to(cr, X, Y);
|
||||
|
||||
|
|
@ -378,8 +383,8 @@ FFTGraph::redraw()
|
|||
for (int x = res->length()-1; x >= 0; x--) {
|
||||
if (res->minAt(x) < mpp)
|
||||
mpp = res->minAt(x);
|
||||
mpp = fmax(mpp, min);
|
||||
mpp = fmin(mpp, max);
|
||||
mpp = fmax(mpp, minf);
|
||||
mpp = fmin(mpp, maxf);
|
||||
|
||||
// If the next point on the log scale is at the same location,
|
||||
// don't draw yet
|
||||
|
|
@ -388,7 +393,7 @@ FFTGraph::redraw()
|
|||
}
|
||||
|
||||
float X = 0.5f + (float)_logScale[x];
|
||||
float Y = 0.5f + (float)( fft_pane_size_h - (int)floor( (mpp - min) * pixels_per_db) );
|
||||
float Y = 0.5f + (float)( fft_pane_size_h - (int)floor( (mpp - minf) * pixels_per_db) );
|
||||
|
||||
cairo_line_to(cr, X, Y );
|
||||
|
||||
|
|
@ -414,8 +419,8 @@ FFTGraph::redraw()
|
|||
|
||||
if (res->avgAt(x) > mpp)
|
||||
mpp = res->avgAt(x);
|
||||
mpp = fmax(mpp, min);
|
||||
mpp = fmin(mpp, max);
|
||||
mpp = fmax(mpp, minf);
|
||||
mpp = fmin(mpp, maxf);
|
||||
|
||||
// If the next point on the log scale is at the same location,
|
||||
// don't draw yet
|
||||
|
|
@ -423,7 +428,7 @@ FFTGraph::redraw()
|
|||
continue;
|
||||
}
|
||||
|
||||
cairo_line_to(cr, 0.5f + (float)_logScale[x], 0.5f + (float)( fft_pane_size_h - (int)floor( (mpp - min) * pixels_per_db) ));
|
||||
cairo_line_to(cr, 0.5f + (float)_logScale[x], 0.5f + (float)( fft_pane_size_h - (int)floor( (mpp - minf) * pixels_per_db) ));
|
||||
|
||||
mpp = -1000000.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#include <fft_result.h>
|
||||
#include <fft_graph.h>
|
||||
#include "fft_result.h"
|
||||
#include "fft_graph.h"
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include <cerrno>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "pbd/stl_delete.h"
|
||||
#include "pbd/xml++.h"
|
||||
|
|
@ -41,8 +42,6 @@
|
|||
#include "ardour/plugin_insert.h"
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include <lrdf.h>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "prompter.h"
|
||||
#include "plugin_ui.h"
|
||||
|
|
@ -311,9 +310,9 @@ GenericPluginUI::build ()
|
|||
// are similar enough to be grouped together.
|
||||
|
||||
string label, previous_label = "";
|
||||
int numbers_in_labels[cui_controls_list.size()];
|
||||
std::vector<int> numbers_in_labels(cui_controls_list.size());
|
||||
|
||||
float similarity_scores[cui_controls_list.size()];
|
||||
std::vector<float> similarity_scores(cui_controls_list.size());
|
||||
float most_similar = 0.0, least_similar = 1.0;
|
||||
|
||||
i = 0;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ GlobalPortMatrix::setup_ports (int dim)
|
|||
}
|
||||
|
||||
_ports[dim].suspend_signals ();
|
||||
_ports[dim].gather (_session, type(), dim == IN, false, show_only_bundles ());
|
||||
_ports[dim].gather (_session, type(), dim == FLOW_IN, false, show_only_bundles ());
|
||||
_ports[dim].resume_signals ();
|
||||
}
|
||||
|
||||
|
|
@ -59,8 +59,8 @@ GlobalPortMatrix::set_state (BundleChannel c[2], bool s)
|
|||
return;
|
||||
}
|
||||
|
||||
Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
|
||||
Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
|
||||
Bundle::PortList const & in_ports = c[FLOW_IN].bundle->channel_ports (c[FLOW_IN].channel);
|
||||
Bundle::PortList const & out_ports = c[FLOW_OUT].bundle->channel_ports (c[FLOW_OUT].channel);
|
||||
|
||||
for (Bundle::PortList::const_iterator i = in_ports.begin(); i != in_ports.end(); ++i) {
|
||||
for (Bundle::PortList::const_iterator j = out_ports.begin(); j != out_ports.end(); ++j) {
|
||||
|
|
@ -103,8 +103,8 @@ GlobalPortMatrix::get_state (BundleChannel c[2]) const
|
|||
return PortMatrixNode::NOT_ASSOCIATED;
|
||||
}
|
||||
|
||||
Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
|
||||
Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
|
||||
Bundle::PortList const & in_ports = c[FLOW_IN].bundle->channel_ports (c[FLOW_IN].channel);
|
||||
Bundle::PortList const & out_ports = c[FLOW_OUT].bundle->channel_ports (c[FLOW_OUT].channel);
|
||||
if (in_ports.empty() || out_ports.empty()) {
|
||||
/* we're looking at a bundle with no parts associated with this channel,
|
||||
so nothing to connect */
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ public:
|
|||
private:
|
||||
/* see PortMatrix: signal flow from 0 to 1 (out to in) */
|
||||
enum {
|
||||
OUT = 0,
|
||||
IN = 1,
|
||||
FLOW_OUT = 0,
|
||||
FLOW_IN = 1,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ GType gtk_custom_hruler_get_type (void)
|
|||
};
|
||||
|
||||
hruler_type = g_type_register_static (gtk_custom_ruler_get_type(), "GtkCustomHRuler",
|
||||
&hruler_info, 0);
|
||||
&hruler_info, (GTypeFlags)0);
|
||||
}
|
||||
|
||||
return hruler_type;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ GType gtk_custom_ruler_get_type (void)
|
|||
};
|
||||
|
||||
ruler_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkCustomRuler",
|
||||
&ruler_info, 0);
|
||||
&ruler_info, (GTypeFlags)0);
|
||||
}
|
||||
|
||||
return ruler_type;
|
||||
|
|
@ -198,9 +198,8 @@ gtk_custom_ruler_set_property (GObject *object,
|
|||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
(void) pspec;
|
||||
|
||||
GtkCustomRuler *ruler = GTK_CUSTOM_RULER (object);
|
||||
(void) pspec;
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ bind_key(PianoKeyboard *pk, const char *key, int note)
|
|||
{
|
||||
assert(pk->key_bindings != NULL);
|
||||
|
||||
g_hash_table_insert(pk->key_bindings, key, (gpointer)((intptr_t)note));
|
||||
g_hash_table_insert(pk->key_bindings, (const gpointer)key, (gpointer)((intptr_t)note));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -610,15 +610,15 @@ piano_keyboard_class_init(PianoKeyboardClass *klass)
|
|||
|
||||
/* Set up signals. */
|
||||
piano_keyboard_signals[NOTE_ON_SIGNAL] = g_signal_new ("note-on",
|
||||
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
|
||||
G_TYPE_FROM_CLASS (klass), (GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION),
|
||||
0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
|
||||
|
||||
piano_keyboard_signals[NOTE_OFF_SIGNAL] = g_signal_new ("note-off",
|
||||
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
|
||||
G_TYPE_FROM_CLASS (klass), (GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION),
|
||||
0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
|
||||
|
||||
piano_keyboard_signals[REST_SIGNAL] = g_signal_new ("rest",
|
||||
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
|
||||
G_TYPE_FROM_CLASS (klass), (GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION),
|
||||
0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
||||
|
||||
widget_klass = (GtkWidgetClass*) klass;
|
||||
|
|
@ -659,7 +659,7 @@ piano_keyboard_get_type(void)
|
|||
0, /* value_table */
|
||||
};
|
||||
|
||||
mk_type = g_type_register_static(GTK_TYPE_DRAWING_AREA, "PianoKeyboard", &mk_info, 0);
|
||||
mk_type = g_type_register_static(GTK_TYPE_DRAWING_AREA, "PianoKeyboard", &mk_info, (GTypeFlags)0);
|
||||
}
|
||||
|
||||
return mk_type;
|
||||
|
|
@ -668,7 +668,7 @@ piano_keyboard_get_type(void)
|
|||
GtkWidget *
|
||||
piano_keyboard_new(void)
|
||||
{
|
||||
GtkWidget *widget = gtk_type_new(piano_keyboard_get_type());
|
||||
GtkWidget *widget = (GtkWidget*)gtk_type_new(piano_keyboard_get_type());
|
||||
|
||||
PianoKeyboard *pk = PIANO_KEYBOARD(widget);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Hit::Hit (
|
|||
bool with_events)
|
||||
: NoteBase (region, with_events, note)
|
||||
{
|
||||
_polygon = new Polygon (group);
|
||||
_polygon = new ArdourCanvas::Polygon (group);
|
||||
set_item (_polygon);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "pbd/file_utils.h"
|
||||
#include "pbd/textreceiver.h"
|
||||
#include "pbd/failed_constructor.h"
|
||||
#include "pbd/pathexpand.h"
|
||||
#include "pbd/pthread_utils.h"
|
||||
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
|
||||
#include "pbd/boost_debug.h"
|
||||
|
|
@ -101,7 +102,7 @@ gui_jack_error ()
|
|||
static void export_search_path (const string& base_dir, const char* varname, const char* dir)
|
||||
{
|
||||
string path;
|
||||
const char * cstr = getenv (varname);
|
||||
const char * cstr = g_getenv (varname);
|
||||
|
||||
if (cstr) {
|
||||
path = cstr;
|
||||
|
|
@ -112,7 +113,7 @@ static void export_search_path (const string& base_dir, const char* varname, con
|
|||
path += base_dir;
|
||||
path += dir;
|
||||
|
||||
setenv (varname, path.c_str(), 1);
|
||||
g_setenv (varname, path.c_str(), 1);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
|
@ -125,7 +126,7 @@ extern void set_language_preference (); // cocoacarbon.mm
|
|||
void
|
||||
fixup_bundle_environment (int, char* [])
|
||||
{
|
||||
if (!getenv ("ARDOUR_BUNDLED")) {
|
||||
if (!g_getenv ("ARDOUR_BUNDLED")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -180,7 +181,7 @@ fixup_bundle_environment (int, char* [])
|
|||
/* unset GTK_RC_FILES so that we only load the RC files that we define
|
||||
*/
|
||||
|
||||
unsetenv ("GTK_RC_FILES");
|
||||
g_unsetenv ("GTK_RC_FILES");
|
||||
|
||||
/* write a pango.rc file and tell pango to use it. we'd love
|
||||
to put this into the PROGRAM_NAME.app bundle and leave it there,
|
||||
|
|
@ -205,13 +206,13 @@ fixup_bundle_environment (int, char* [])
|
|||
<< endl;
|
||||
pangorc.close ();
|
||||
|
||||
setenv ("PANGO_RC_FILE", path.c_str(), 1);
|
||||
g_setenv ("PANGO_RC_FILE", path.c_str(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
setenv ("CHARSETALIASDIR", bundle_dir.c_str(), 1);
|
||||
setenv ("FONTCONFIG_FILE", Glib::build_filename (bundle_dir, "Resources/fonts.conf").c_str(), 1);
|
||||
setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (bundle_dir, "Resources/gdk-pixbuf.loaders").c_str(), 1);
|
||||
g_setenv ("CHARSETALIASDIR", bundle_dir.c_str(), 1);
|
||||
g_setenv ("FONTCONFIG_FILE", Glib::build_filename (bundle_dir, "Resources/fonts.conf").c_str(), 1);
|
||||
g_setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (bundle_dir, "Resources/gdk-pixbuf.loaders").c_str(), 1);
|
||||
}
|
||||
|
||||
static void load_custom_fonts() {
|
||||
|
|
@ -249,7 +250,7 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
|
|||
* acceptable to build paths directly using '/'.
|
||||
*/
|
||||
|
||||
if (!getenv ("ARDOUR_BUNDLED")) {
|
||||
if (!g_getenv ("ARDOUR_BUNDLED")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -268,7 +269,7 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
|
|||
lpath.push_back (dir_path);
|
||||
lpath.push_back ("share");
|
||||
lpath.push_back ("locale");
|
||||
localedir = realpath (Glib::build_filename (lpath).c_str(), NULL);
|
||||
localedir = canonical_path (Glib::build_filename (lpath)).c_str();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -290,15 +291,15 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
|
|||
/* unset GTK_RC_FILES so that we only load the RC files that we define
|
||||
*/
|
||||
|
||||
unsetenv ("GTK_RC_FILES");
|
||||
g_unsetenv ("GTK_RC_FILES");
|
||||
|
||||
/* Tell fontconfig where to find fonts.conf. Use the system version
|
||||
if it exists, otherwise use the stuff we included in the bundle
|
||||
*/
|
||||
|
||||
if (Glib::file_test ("/etc/fonts/fonts.conf", Glib::FILE_TEST_EXISTS)) {
|
||||
setenv ("FONTCONFIG_FILE", "/etc/fonts/fonts.conf", 1);
|
||||
setenv ("FONTCONFIG_PATH", "/etc/fonts", 1);
|
||||
g_setenv ("FONTCONFIG_FILE", "/etc/fonts/fonts.conf", 1);
|
||||
g_setenv ("FONTCONFIG_PATH", "/etc/fonts", 1);
|
||||
} else {
|
||||
error << _("No fontconfig file found on your system. Things may looked very odd or ugly") << endmsg;
|
||||
}
|
||||
|
|
@ -327,19 +328,19 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
|
|||
pangorc.close ();
|
||||
}
|
||||
|
||||
setenv ("PANGO_RC_FILE", path.c_str(), 1);
|
||||
g_setenv ("PANGO_RC_FILE", path.c_str(), 1);
|
||||
|
||||
/* similar for GDK pixbuf loaders, but there's no RC file required
|
||||
to specify where it lives.
|
||||
*/
|
||||
|
||||
setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (userconfigdir, "gdk-pixbuf.loaders").c_str(), 1);
|
||||
g_setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (userconfigdir, "gdk-pixbuf.loaders").c_str(), 1);
|
||||
}
|
||||
|
||||
/* this doesn't do much but setting it should prevent various parts of the GTK/GNU stack
|
||||
from looking outside the bundle to find the charset.alias file.
|
||||
*/
|
||||
setenv ("CHARSETALIASDIR", dir_path.c_str(), 1);
|
||||
g_setenv ("CHARSETALIASDIR", dir_path.c_str(), 1);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -460,7 +461,7 @@ int main (int argc, char *argv[])
|
|||
text_receiver.listen_to (warning);
|
||||
|
||||
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
|
||||
if (getenv ("BOOST_DEBUG")) {
|
||||
if (g_getenv ("BOOST_DEBUG")) {
|
||||
boost_debug_shared_ptr_show_live_debugging (true);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -505,9 +506,11 @@ int main (int argc, char *argv[])
|
|||
return curvetest (curvetest_file);
|
||||
}
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
if (::signal (SIGPIPE, sigpipe_handler)) {
|
||||
cerr << _("Cannot xinstall SIGPIPE error handler") << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
try {
|
||||
ui = new ARDOUR_UI (&argc, &argv, localedir);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ MainClock::build_ops_menu ()
|
|||
MenuList& ops_items = ops_menu->items();
|
||||
ops_items.push_back (SeparatorElem ());
|
||||
ops_items.push_back (CheckMenuElem (_("Display delta to edit cursor"), sigc::mem_fun (*this, &MainClock::display_delta_to_edit_cursor)));
|
||||
CheckMenuItem* c = dynamic_cast<CheckMenuItem *> (&ops_items.back());
|
||||
Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem *> (&ops_items.back());
|
||||
if (_primary) {
|
||||
if (ARDOUR::Config->get_primary_clock_delta_edit_cursor ()) {
|
||||
ARDOUR::Config->set_primary_clock_delta_edit_cursor (false);
|
||||
|
|
|
|||
|
|
@ -885,7 +885,7 @@ meter_render_metrics (Gtk::Widget& w, MeterType type, vector<DataType> types)
|
|||
case DataType::MIDI:
|
||||
align_center = false; // don't bleed into legend
|
||||
fraction = (j->first) / 127.0;
|
||||
pos = 1 + height - (gint) rintf (height * fraction);
|
||||
pos = 1 + height - (gint) lrintf (height * fraction);
|
||||
pos = min (pos, height);
|
||||
cairo_set_source_rgb (cr, c.get_red_p(), c.get_green_p(), c.get_blue_p());
|
||||
if (tickleft) {
|
||||
|
|
|
|||
|
|
@ -516,7 +516,7 @@ MidiChannelSelectorWindow::set_playback_selected_channels (uint16_t mask)
|
|||
case ForceChannel:
|
||||
/* only set the lowest set channel in the mask as active */
|
||||
for (uint16_t i = 0; i < 16; i++) {
|
||||
playback_buttons[i]->set_active (i == (ffs (mask) - 1));
|
||||
playback_buttons[i]->set_active (i == (PBD::ffs (mask) - 1));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -539,7 +539,7 @@ MidiChannelSelectorWindow::set_capture_selected_channels (uint16_t mask)
|
|||
case ForceChannel:
|
||||
/* only set the lowest set channel in the mask as active */
|
||||
for (uint16_t i = 0; i < 16; i++) {
|
||||
capture_buttons[i]->set_active (i == (ffs (mask) - 1));
|
||||
capture_buttons[i]->set_active (i == (PBD::ffs (mask) - 1));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -595,7 +595,7 @@ MidiChannelSelectorWindow::playback_mode_changed ()
|
|||
case ForceChannel:
|
||||
if (last_drawn_playback_mode == AllChannels || last_drawn_playback_mode == FilterChannels) {
|
||||
playback_buttons.clear ();
|
||||
first_channel = ffs (track->get_playback_channel_mask()) - 1;
|
||||
first_channel = PBD::ffs (track->get_playback_channel_mask()) - 1;
|
||||
}
|
||||
for (vector<Widget*>::iterator i = playback_mask_controls.begin(); i != playback_mask_controls.end(); ++i) {
|
||||
(*i)->set_sensitive (false);
|
||||
|
|
@ -693,7 +693,7 @@ MidiChannelSelectorWindow::capture_mode_changed ()
|
|||
case ForceChannel:
|
||||
if (last_drawn_capture_mode == AllChannels || last_drawn_capture_mode == FilterChannels) {
|
||||
capture_buttons.clear ();
|
||||
first_channel = ffs (track->get_capture_channel_mask()) - 1;
|
||||
first_channel = PBD::ffs (track->get_capture_channel_mask()) - 1;
|
||||
}
|
||||
for (vector<Widget*>::iterator i = capture_mask_controls.begin(); i != capture_mask_controls.end(); ++i) {
|
||||
(*i)->set_sensitive (false);
|
||||
|
|
|
|||
|
|
@ -3080,7 +3080,7 @@ MidiRegionView::nudge_notes (bool forward)
|
|||
return;
|
||||
}
|
||||
|
||||
Evoral::MusicalTime delta = region_frames_to_region_beats (fabs (distance));
|
||||
Evoral::MusicalTime delta = region_frames_to_region_beats (fabs ((double)distance));
|
||||
|
||||
if (!forward) {
|
||||
delta = -delta;
|
||||
|
|
@ -3298,7 +3298,7 @@ MidiRegionView::selection_as_cut_buffer () const
|
|||
{
|
||||
Notes notes;
|
||||
|
||||
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
|
||||
for (Selection::const_iterator i = _selection.begin(); i != _selection.end(); ++i) {
|
||||
NoteType* n = (*i)->note().get();
|
||||
notes.insert (boost::shared_ptr<NoteType> (new NoteType (*n)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
|
||||
#include <strings.h> // for ffs(3)
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
@ -28,6 +26,7 @@
|
|||
#include <sigc++/bind.h>
|
||||
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/ffs.h"
|
||||
#include "pbd/stl_delete.h"
|
||||
#include "pbd/whitespace.h"
|
||||
#include "pbd/basename.h"
|
||||
|
|
@ -663,7 +662,7 @@ MidiTimeAxisView::add_channel_command_menu_item (Menu_Helpers::MenuList& items,
|
|||
}
|
||||
}
|
||||
|
||||
CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&chn_items.back());
|
||||
Gtk::CheckMenuItem* cmi = static_cast<Gtk::CheckMenuItem*>(&chn_items.back());
|
||||
_channel_command_menu_map[fully_qualified_param] = cmi;
|
||||
cmi->set_active (visible);
|
||||
}
|
||||
|
|
@ -695,7 +694,7 @@ MidiTimeAxisView::add_channel_command_menu_item (Menu_Helpers::MenuList& items,
|
|||
}
|
||||
}
|
||||
|
||||
CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&items.back());
|
||||
Gtk::CheckMenuItem* cmi = static_cast<Gtk::CheckMenuItem*>(&items.back());
|
||||
_channel_command_menu_map[fully_qualified_param] = cmi;
|
||||
cmi->set_active (visible);
|
||||
|
||||
|
|
@ -737,7 +736,7 @@ MidiTimeAxisView::add_single_channel_controller_item(Menu_Helpers::MenuList& ctl
|
|||
}
|
||||
}
|
||||
|
||||
CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&ctl_items.back());
|
||||
Gtk::CheckMenuItem* cmi = static_cast<Gtk::CheckMenuItem*>(&ctl_items.back());
|
||||
_controller_menu_map[fully_qualified_param] = cmi;
|
||||
cmi->set_active (visible);
|
||||
|
||||
|
|
@ -793,7 +792,7 @@ MidiTimeAxisView::add_multi_channel_controller_item(Menu_Helpers::MenuList& ctl_
|
|||
}
|
||||
}
|
||||
|
||||
CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&chn_items.back());
|
||||
Gtk::CheckMenuItem* cmi = static_cast<Gtk::CheckMenuItem*>(&chn_items.back());
|
||||
_controller_menu_map[fully_qualified_param] = cmi;
|
||||
cmi->set_active (visible);
|
||||
}
|
||||
|
|
@ -1489,7 +1488,7 @@ MidiTimeAxisView::playback_channel_mode_changed ()
|
|||
_playback_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2</i>", _("Play"), _("some")));
|
||||
break;
|
||||
case ForceChannel:
|
||||
_playback_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Play"), _("all"), ffs (midi_track()->get_playback_channel_mask())));
|
||||
_playback_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Play"), _("all"), PBD::ffs (midi_track()->get_playback_channel_mask())));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1505,7 +1504,7 @@ MidiTimeAxisView::capture_channel_mode_changed ()
|
|||
_capture_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2</i>", _("Rec"), _("some")));
|
||||
break;
|
||||
case ForceChannel:
|
||||
_capture_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Rec"), _("all"), ffs (midi_track()->get_capture_channel_mask())));
|
||||
_capture_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Rec"), _("all"), PBD::ffs (midi_track()->get_capture_channel_mask())));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@
|
|||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "pbd/localtime_r.h"
|
||||
#include "pbd/timersub.h"
|
||||
|
||||
#include "midi++/parser.h"
|
||||
|
||||
#include "ardour/async_midi_port.h"
|
||||
|
|
@ -212,7 +215,7 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
|
|||
s = snprintf (buf, bufsize, "+%02" PRId64 ":%06" PRId64, (int64_t) delta.tv_sec, (int64_t) delta.tv_usec);
|
||||
bufsize -= s;
|
||||
} else {
|
||||
localtime_r (&tv.tv_sec, &now);
|
||||
localtime_r ((const time_t*)&tv.tv_sec, &now);
|
||||
s = strftime (buf, bufsize, "%H:%M:%S", &now);
|
||||
bufsize -= s;
|
||||
s += snprintf (&buf[s], bufsize, ".%06" PRId64, (int64_t) tv.tv_usec);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "pbd/compose.h"
|
||||
#include "pbd/replace_all.h"
|
||||
#include "pbd/strsplit.h"
|
||||
#include "pbd/search_path.h"
|
||||
|
||||
#include "ardour/session.h"
|
||||
|
||||
|
|
@ -56,14 +57,18 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT
|
|||
break;
|
||||
}
|
||||
|
||||
string dirstr;
|
||||
vector<string> source_dirs = s->source_search_path (type);
|
||||
vector<string>::iterator i = source_dirs.begin();
|
||||
ostringstream oss;
|
||||
oss << *i << endl;
|
||||
|
||||
dirstr = s->source_search_path (type);
|
||||
replace_all (dirstr, ":", "\n");
|
||||
while (++i != source_dirs.end()) {
|
||||
oss << *i << endl;
|
||||
}
|
||||
|
||||
msg.set_justify (JUSTIFY_CENTER);
|
||||
msg.set_markup (string_compose (_("%1 cannot find the %2 file\n\n<i>%3</i>\n\nin any of these folders:\n\n\
|
||||
<tt>%4</tt>\n\n"), PROGRAM_NAME, typestr, Glib::Markup::escape_text(path), Glib::Markup::escape_text (dirstr)));
|
||||
<tt>%4</tt>\n\n"), PROGRAM_NAME, typestr, Glib::Markup::escape_text(path), Glib::Markup::escape_text (oss.str())));
|
||||
|
||||
HBox* hbox = manage (new HBox);
|
||||
hbox->pack_start (msg, false, true);
|
||||
|
|
|
|||
|
|
@ -1522,7 +1522,7 @@ MixerStrip::build_route_ops_menu ()
|
|||
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (CheckMenuElem (_("Active")));
|
||||
CheckMenuItem* i = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||
Gtk::CheckMenuItem* i = dynamic_cast<Gtk::CheckMenuItem *> (&items.back());
|
||||
i->set_active (_route->active());
|
||||
i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::set_route_active), !_route->active(), false));
|
||||
|
||||
|
|
@ -1532,7 +1532,7 @@ MixerStrip::build_route_ops_menu ()
|
|||
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (CheckMenuElem (_("Protect Against Denormals"), sigc::mem_fun (*this, &RouteUI::toggle_denormal_protection)));
|
||||
denormal_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||
denormal_menu_item = dynamic_cast<Gtk::CheckMenuItem *> (&items.back());
|
||||
denormal_menu_item->set_active (_route->denormal_protection());
|
||||
|
||||
if (!Profile->get_sae()) {
|
||||
|
|
|
|||
|
|
@ -35,8 +35,10 @@ Note::Note (
|
|||
)
|
||||
: NoteBase (region, with_events, note)
|
||||
{
|
||||
_rectangle = new Rectangle (group);
|
||||
_rectangle = new ArdourCanvas::Rectangle (group);
|
||||
#ifdef CANVAS_DEBUG
|
||||
_rectangle->name = "note";
|
||||
#endif
|
||||
set_item (_rectangle);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,11 @@
|
|||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef COMPILER_MSVC
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#else
|
||||
#include <process.h> // Needed for 'getpid()'
|
||||
#endif
|
||||
|
||||
namespace NSM
|
||||
{
|
||||
|
|
|
|||
|
|
@ -227,9 +227,9 @@ public:
|
|||
_get (g),
|
||||
_set (s)
|
||||
{
|
||||
_label = manage (new Gtk::Label (n + ":"));
|
||||
_label = Gtk::manage (new Gtk::Label (n + ":"));
|
||||
_label->set_alignment (0, 0.5);
|
||||
_combo = manage (new Gtk::ComboBoxText);
|
||||
_combo = Gtk::manage (new Gtk::ComboBoxText);
|
||||
_combo->signal_changed().connect (sigc::mem_fun (*this, &ComboOption::changed));
|
||||
}
|
||||
|
||||
|
|
@ -305,9 +305,9 @@ public:
|
|||
)
|
||||
: Option (i, n)
|
||||
{
|
||||
_label = manage (new Gtk::Label (n + ":"));
|
||||
_label = Gtk::manage (new Gtk::Label (n + ":"));
|
||||
_label->set_alignment (0, 0.5);
|
||||
_hscale = manage (new Gtk::HScale(adj));
|
||||
_hscale = Gtk::manage (new Gtk::HScale(adj));
|
||||
_adj = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -323,9 +323,9 @@ public:
|
|||
, _set (s)
|
||||
, _adj (adj)
|
||||
{
|
||||
_label = manage (new Gtk::Label (n + ":"));
|
||||
_label = Gtk::manage (new Gtk::Label (n + ":"));
|
||||
_label->set_alignment (0, 0.5);
|
||||
_hscale = manage (new Gtk::HScale(*_adj));
|
||||
_hscale = Gtk::manage (new Gtk::HScale(*_adj));
|
||||
_adj->signal_value_changed().connect (sigc::mem_fun (*this, &HSliderOption::changed));
|
||||
}
|
||||
|
||||
|
|
@ -379,9 +379,9 @@ public:
|
|||
_get (g),
|
||||
_set (s)
|
||||
{
|
||||
_label = manage (new Gtk::Label (n + ":"));
|
||||
_label = Gtk::manage (new Gtk::Label (n + ":"));
|
||||
_label->set_alignment (0, 0.5);
|
||||
_combo = manage (new Gtk::ComboBoxText);
|
||||
_combo = Gtk::manage (new Gtk::ComboBoxText);
|
||||
_combo->signal_changed().connect (sigc::mem_fun (*this, &ComboStringOption::changed));
|
||||
}
|
||||
|
||||
|
|
@ -493,18 +493,18 @@ public:
|
|||
_set (s),
|
||||
_scale (scale)
|
||||
{
|
||||
_label = manage (new Gtk::Label (n + ":"));
|
||||
_label = Gtk::manage (new Gtk::Label (n + ":"));
|
||||
_label->set_alignment (0, 0.5);
|
||||
|
||||
_spin = manage (new Gtk::SpinButton);
|
||||
_spin = Gtk::manage (new Gtk::SpinButton);
|
||||
_spin->set_range (min, max);
|
||||
_spin->set_increments (step, page);
|
||||
|
||||
_box = manage (new Gtk::HBox);
|
||||
_box = Gtk::manage (new Gtk::HBox);
|
||||
_box->pack_start (*_spin, true, true);
|
||||
_box->set_spacing (4);
|
||||
if (unit.length()) {
|
||||
_box->pack_start (*manage (new Gtk::Label (unit)), false, false);
|
||||
_box->pack_start (*Gtk::manage (new Gtk::Label (unit)), false, false);
|
||||
}
|
||||
|
||||
_spin->signal_value_changed().connect (sigc::mem_fun (*this, &SpinOption::changed));
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
|||
{
|
||||
CartesianVector c;
|
||||
cairo_t* cr;
|
||||
bool small = (height <= large_size_threshold);
|
||||
bool small_size = (height <= large_size_threshold);
|
||||
const double diameter = radius*2.0;
|
||||
|
||||
cr = gdk_cairo_create (get_window()->gobj());
|
||||
|
|
@ -473,7 +473,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
|||
|
||||
cairo_select_font_face (cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
|
||||
|
||||
if (small) {
|
||||
if (small_size) {
|
||||
arc_radius = 4.0;
|
||||
} else {
|
||||
cairo_set_font_size (cr, 10);
|
||||
|
|
@ -498,10 +498,10 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
|||
cairo_set_source_rgba (cr, 0.517, 0.772, 0.882, 1.0);
|
||||
cairo_stroke (cr);
|
||||
|
||||
if (!small && !signal->text.empty()) {
|
||||
if (!small_size && !signal->text.empty()) {
|
||||
cairo_set_source_rgb (cr, 0.517, 0.772, 0.882);
|
||||
/* the +/- adjustments are a hack to try to center the text in the circle */
|
||||
if (small) {
|
||||
if (small_size) {
|
||||
cairo_move_to (cr, c.x - 1, c.y + 1);
|
||||
} else {
|
||||
cairo_move_to (cr, c.x - 4, c.y + 4);
|
||||
|
|
@ -535,7 +535,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
|||
cairo_move_to (cr, c.x, c.y);
|
||||
cairo_save (cr);
|
||||
cairo_rotate (cr, -(speaker->position.azi/360.0) * (2.0 * M_PI));
|
||||
if (small) {
|
||||
if (small_size) {
|
||||
cairo_scale (cr, 0.8, 0.8);
|
||||
} else {
|
||||
cairo_scale (cr, 1.2, 1.2);
|
||||
|
|
@ -553,7 +553,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
|||
cairo_fill (cr);
|
||||
cairo_restore (cr);
|
||||
|
||||
if (!small) {
|
||||
if (!small_size) {
|
||||
cairo_set_font_size (cr, 16);
|
||||
|
||||
/* move the text in just a bit */
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ PannerUI::build_pan_menu ()
|
|||
items.clear ();
|
||||
|
||||
items.push_back (CheckMenuElem (_("Bypass"), sigc::mem_fun(*this, &PannerUI::pan_bypass_toggle)));
|
||||
bypass_menu_item = static_cast<CheckMenuItem*> (&items.back());
|
||||
bypass_menu_item = static_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
|
||||
/* set state first, connect second */
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ PatchChangeDialog::PatchChangeDialog (
|
|||
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||
add_button (ok, RESPONSE_ACCEPT);
|
||||
if (allow_delete) {
|
||||
add_button (Stock::DELETE, RESPONSE_REJECT);
|
||||
add_button (Gtk::StockID(GTK_STOCK_DELETE), RESPONSE_REJECT);
|
||||
}
|
||||
set_default_response (RESPONSE_ACCEPT);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,10 @@
|
|||
#include <fstream>
|
||||
#include <cstring>
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include <glibmm/miscutils.h>
|
||||
|
|
@ -70,6 +73,7 @@ struct ping_call {
|
|||
static void*
|
||||
_pingback (void *arg)
|
||||
{
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
ping_call* cm = static_cast<ping_call*> (arg);
|
||||
CURL* c;
|
||||
struct utsname utb;
|
||||
|
|
@ -158,6 +162,8 @@ _pingback (void *arg)
|
|||
curl_easy_cleanup (c);
|
||||
delete cm;
|
||||
|
||||
#endif /* PLATFORM_WINDOWS */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,17 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifdef COMPILER_MSVC
|
||||
#include <float.h>
|
||||
|
||||
// 'std::isinf()' and 'std::isnan()' are not available in MSVC.
|
||||
#define isinf(val) !((bool)_finite((double)val))
|
||||
#define isnan(val) (bool)_isnan((double)val)
|
||||
#else
|
||||
using std::isnan;
|
||||
using std::isinf;
|
||||
#endif
|
||||
|
||||
#include "plugin_eq_gui.h"
|
||||
#include "fft.h"
|
||||
|
||||
|
|
@ -765,13 +776,13 @@ PluginEqGui::plot_signal_amplitude_difference(Gtk::Widget *w, cairo_t *cr)
|
|||
}
|
||||
*/
|
||||
|
||||
if (std::isinf(power)) {
|
||||
if (isinf(power)) {
|
||||
if (power < 0) {
|
||||
power = _min_dB - 1.0;
|
||||
} else {
|
||||
power = _max_dB - 1.0;
|
||||
}
|
||||
} else if (std::isnan(power)) {
|
||||
} else if (isnan(power)) {
|
||||
power = _min_dB - 1.0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
#endif
|
||||
|
||||
#include <cstdio>
|
||||
#include <lrdf.h>
|
||||
#include <map>
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@
|
|||
#include "lv2_plugin_ui.h"
|
||||
#endif
|
||||
|
||||
#include <lrdf.h>
|
||||
|
||||
#include "ardour_window.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "prompter.h"
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
|
|||
items.push_back (MenuElem (_("Rescan"), sigc::mem_fun (*this, &PortMatrix::setup_all_ports)));
|
||||
|
||||
items.push_back (CheckMenuElem (_("Show individual ports"), sigc::mem_fun (*this, &PortMatrix::toggle_show_only_bundles)));
|
||||
CheckMenuItem* i = dynamic_cast<CheckMenuItem*> (&items.back());
|
||||
Gtk::CheckMenuItem* i = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
_inhibit_toggle_show_only_bundles = true;
|
||||
i->set_active (!_show_only_bundles);
|
||||
_inhibit_toggle_show_only_bundles = false;
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ ProcessorEntry::build_controls_menu ()
|
|||
|
||||
for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
|
||||
items.push_back (CheckMenuElem ((*i)->name ()));
|
||||
CheckMenuItem* c = dynamic_cast<CheckMenuItem*> (&items.back ());
|
||||
Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ());
|
||||
c->set_active ((*i)->visible ());
|
||||
c->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &ProcessorEntry::toggle_control_visibility), *i));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ public:
|
|||
_dpi_adjustment (50, 50, 250, 1, 10),
|
||||
_dpi_slider (_dpi_adjustment)
|
||||
{
|
||||
_dpi_adjustment.set_value (floor (_rc_config->get_font_scale () / 1024));
|
||||
_dpi_adjustment.set_value (floor ((double)(_rc_config->get_font_scale () / 1024)));
|
||||
|
||||
Label* l = manage (new Label (_("Font scaling:")));
|
||||
l->set_name ("OptionsLabel");
|
||||
|
|
@ -548,7 +548,7 @@ public:
|
|||
void parameter_changed (string const & p)
|
||||
{
|
||||
if (p == "font-scale") {
|
||||
_dpi_adjustment.set_value (floor (_rc_config->get_font_scale() / 1024));
|
||||
_dpi_adjustment.set_value (floor ((double)(_rc_config->get_font_scale() / 1024)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __gtk_ardour_rc_option_editor_h__
|
||||
#define __gtk_ardour_rc_option_editor_h__
|
||||
|
||||
#include "option_editor.h"
|
||||
#include "visibility_group.h"
|
||||
|
||||
|
|
@ -54,3 +57,5 @@ private:
|
|||
|
||||
PBD::ScopedConnection parameter_change_connection;
|
||||
};
|
||||
|
||||
#endif /* __gtk_ardour_rc_option_editor_h__ */
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@
|
|||
#ifndef __gtk_ardour_region_view_h__
|
||||
#define __gtk_ardour_region_view_h__
|
||||
|
||||
#ifdef interface
|
||||
#undef interface
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <sigc++/signal.h>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ ReturnUI::ReturnUI (Gtk::Window* parent, boost::shared_ptr<Return> r, Session* s
|
|||
|
||||
_vbox.pack_start (_hbox, false, false, false);
|
||||
|
||||
io = manage (new IOSelector (parent, session, r->output()));
|
||||
io = Gtk::manage (new IOSelector (parent, session, r->output()));
|
||||
|
||||
pack_start (_vbox, false, false);
|
||||
|
||||
|
|
|
|||
|
|
@ -698,7 +698,7 @@ RouteTimeAxisView::build_display_menu ()
|
|||
}
|
||||
|
||||
items.push_back (CheckMenuElem (_("Active")));
|
||||
CheckMenuItem* i = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||
Gtk::CheckMenuItem* i = dynamic_cast<Gtk::CheckMenuItem *> (&items.back());
|
||||
bool click_sets_active = true;
|
||||
if (active > 0 && inactive == 0) {
|
||||
i->set_active (true);
|
||||
|
|
@ -2028,12 +2028,12 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p
|
|||
for (std::set<Evoral::Parameter>::const_iterator i = automatable.begin(); i != automatable.end(); ++i) {
|
||||
|
||||
ProcessorAutomationNode* pan;
|
||||
CheckMenuItem* mitem;
|
||||
Gtk::CheckMenuItem* mitem;
|
||||
|
||||
string name = processor->describe_parameter (*i);
|
||||
|
||||
items.push_back (CheckMenuElem (name));
|
||||
mitem = dynamic_cast<CheckMenuItem*> (&items.back());
|
||||
mitem = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
|
||||
_subplugin_menu_map[*i] = mitem;
|
||||
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ RouteUI::build_record_menu ()
|
|||
MenuList& items = record_menu->items();
|
||||
|
||||
items.push_back (CheckMenuElem (_("Step Entry"), sigc::mem_fun (*this, &RouteUI::toggle_step_edit)));
|
||||
step_edit_item = dynamic_cast<CheckMenuItem*> (&items.back());
|
||||
step_edit_item = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
|
||||
if (_route->record_enabled()) {
|
||||
step_edit_item->set_sensitive (false);
|
||||
|
|
@ -1206,20 +1206,20 @@ RouteUI::build_solo_menu (void)
|
|||
solo_menu = new Menu;
|
||||
solo_menu->set_name ("ArdourContextMenu");
|
||||
MenuList& items = solo_menu->items();
|
||||
CheckMenuItem* check;
|
||||
Gtk::CheckMenuItem* check;
|
||||
|
||||
check = new CheckMenuItem(_("Solo Isolate"));
|
||||
check = new Gtk::CheckMenuItem(_("Solo Isolate"));
|
||||
check->set_active (_route->solo_isolated());
|
||||
check->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_solo_isolated), check));
|
||||
items.push_back (CheckMenuElem(*check));
|
||||
solo_isolated_check = dynamic_cast<CheckMenuItem*>(&items.back());
|
||||
solo_isolated_check = dynamic_cast<Gtk::CheckMenuItem*>(&items.back());
|
||||
check->show_all();
|
||||
|
||||
check = new CheckMenuItem(_("Solo Safe"));
|
||||
check = new Gtk::CheckMenuItem(_("Solo Safe"));
|
||||
check->set_active (_route->solo_safe());
|
||||
check->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_solo_safe), check));
|
||||
items.push_back (CheckMenuElem(*check));
|
||||
solo_safe_check = dynamic_cast<CheckMenuItem*>(&items.back());
|
||||
solo_safe_check = dynamic_cast<Gtk::CheckMenuItem*>(&items.back());
|
||||
check->show_all();
|
||||
|
||||
//items.push_back (SeparatorElem());
|
||||
|
|
@ -1237,25 +1237,25 @@ RouteUI::build_mute_menu(void)
|
|||
|
||||
MenuList& items = mute_menu->items();
|
||||
|
||||
pre_fader_mute_check = manage (new CheckMenuItem(_("Pre Fader")));
|
||||
pre_fader_mute_check = manage (new Gtk::CheckMenuItem(_("Pre Fader")));
|
||||
init_mute_menu(MuteMaster::PreFader, pre_fader_mute_check);
|
||||
pre_fader_mute_check->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_mute_menu), MuteMaster::PreFader, pre_fader_mute_check));
|
||||
items.push_back (CheckMenuElem(*pre_fader_mute_check));
|
||||
pre_fader_mute_check->show_all();
|
||||
|
||||
post_fader_mute_check = manage (new CheckMenuItem(_("Post Fader")));
|
||||
post_fader_mute_check = manage (new Gtk::CheckMenuItem(_("Post Fader")));
|
||||
init_mute_menu(MuteMaster::PostFader, post_fader_mute_check);
|
||||
post_fader_mute_check->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_mute_menu), MuteMaster::PostFader, post_fader_mute_check));
|
||||
items.push_back (CheckMenuElem(*post_fader_mute_check));
|
||||
post_fader_mute_check->show_all();
|
||||
|
||||
listen_mute_check = manage (new CheckMenuItem(_("Control Outs")));
|
||||
listen_mute_check = manage (new Gtk::CheckMenuItem(_("Control Outs")));
|
||||
init_mute_menu(MuteMaster::Listen, listen_mute_check);
|
||||
listen_mute_check->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_mute_menu), MuteMaster::Listen, listen_mute_check));
|
||||
items.push_back (CheckMenuElem(*listen_mute_check));
|
||||
listen_mute_check->show_all();
|
||||
|
||||
main_mute_check = manage (new CheckMenuItem(_("Main Outs")));
|
||||
main_mute_check = manage (new Gtk::CheckMenuItem(_("Main Outs")));
|
||||
init_mute_menu(MuteMaster::Main, main_mute_check);
|
||||
main_mute_check->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_mute_menu), MuteMaster::Main, main_mute_check));
|
||||
items.push_back (CheckMenuElem(*main_mute_check));
|
||||
|
|
@ -1268,7 +1268,7 @@ RouteUI::build_mute_menu(void)
|
|||
}
|
||||
|
||||
void
|
||||
RouteUI::init_mute_menu(MuteMaster::MutePoint mp, CheckMenuItem* check)
|
||||
RouteUI::init_mute_menu(MuteMaster::MutePoint mp, Gtk::CheckMenuItem* check)
|
||||
{
|
||||
check->set_active (_route->mute_points() & mp);
|
||||
}
|
||||
|
|
@ -1957,7 +1957,7 @@ RouteUI::invert_press (GdkEventButton* ev)
|
|||
|
||||
for (uint32_t i = 0; i < N; ++i) {
|
||||
items.push_back (CheckMenuElem (string_compose (X_("Ø%1"), i + 1), sigc::bind (sigc::mem_fun (*this, &RouteUI::invert_menu_toggled), i)));
|
||||
CheckMenuItem* e = dynamic_cast<CheckMenuItem*> (&items.back ());
|
||||
Gtk::CheckMenuItem* e = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ());
|
||||
++_i_am_the_modifier;
|
||||
e->set_active (_route->phase_invert (i));
|
||||
--_i_am_the_modifier;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> s, Session* session
|
|||
// users (among others)
|
||||
// _vbox.pack_start (_panners, false, false);
|
||||
|
||||
io = manage (new IOSelector (parent, session, s->output()));
|
||||
io = Gtk::manage (new IOSelector (parent, session, s->output()));
|
||||
|
||||
pack_start (_vbox, false, false);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@
|
|||
|
||||
#include "ardour_dialog.h"
|
||||
|
||||
#ifdef interface
|
||||
#undef interface
|
||||
#endif
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
|
@ -82,7 +86,7 @@ class TextMetadataField : public MetadataField {
|
|||
Gtk::Label* value_label;
|
||||
Gtk::Entry* entry;
|
||||
|
||||
uint width;
|
||||
guint width;
|
||||
};
|
||||
|
||||
/// MetadataField that accepts only numbers
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __gtk_ardour_session_option_editor_h__
|
||||
#define __gtk_ardour_session_option_editor_h__
|
||||
|
||||
#include "option_editor.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
|
@ -39,3 +42,5 @@ private:
|
|||
|
||||
ComboOption<float>* _vpu;
|
||||
};
|
||||
|
||||
#endif /* __gtk_ardour_session_option_editor_h__ */
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ void Mootcher::ensureWorkingDir ()
|
|||
}
|
||||
}
|
||||
basePath = p;
|
||||
#ifdef __WIN32__
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
std::string replace = "/";
|
||||
size_t pos = basePath.find("\\");
|
||||
while( pos != std::string::npos ){
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/stock.h>
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
#include <glibmm/fileutils.h>
|
||||
|
||||
#include "pbd/convert.h"
|
||||
|
|
@ -1457,6 +1459,9 @@ SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool&
|
|||
bool
|
||||
SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths)
|
||||
{
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
return false;
|
||||
#else
|
||||
std::string tmpdir(Glib::build_filename (s->session_directory().sound_path(), "linktest"));
|
||||
bool ret = false;
|
||||
|
||||
|
|
@ -1478,7 +1483,7 @@ SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths
|
|||
goto out;
|
||||
}
|
||||
|
||||
unlink (tmpc);
|
||||
::g_unlink (tmpc);
|
||||
}
|
||||
|
||||
ret = true;
|
||||
|
|
@ -1486,6 +1491,7 @@ SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths
|
|||
out:
|
||||
rmdir (tmpdir.c_str());
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
SoundFileChooser::SoundFileChooser (string title, ARDOUR::Session* s)
|
||||
|
|
|
|||
|
|
@ -25,9 +25,12 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#ifdef __WIN32__
|
||||
#ifndef COMPILER_MSVC
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <fcntl.h>
|
||||
|
|
@ -47,7 +50,7 @@ void * interposer_thread (void *arg);
|
|||
|
||||
static void close_fd (int& fd) { if (fd >= 0) ::close (fd); fd = -1; }
|
||||
|
||||
#ifndef __WIN32__
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
/*
|
||||
* This function was part of libasyncns.
|
||||
* LGPL v2.1
|
||||
|
|
@ -155,7 +158,7 @@ SystemExec::SystemExec (std::string c, std::string a)
|
|||
nicelevel = 0;
|
||||
envp = NULL;
|
||||
argp = NULL;
|
||||
#ifdef __WIN32__
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE;
|
||||
stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE;
|
||||
stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE;
|
||||
|
|
@ -173,7 +176,7 @@ SystemExec::SystemExec (std::string c, char **a)
|
|||
pin[1] = -1;
|
||||
nicelevel = 0;
|
||||
envp = NULL;
|
||||
#ifdef __WIN32__
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE;
|
||||
stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE;
|
||||
stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE;
|
||||
|
|
@ -197,7 +200,7 @@ SystemExec::~SystemExec ()
|
|||
}
|
||||
free (argp);
|
||||
}
|
||||
#ifdef __WIN32__
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
if (w_args) free(w_args);
|
||||
#endif
|
||||
pthread_mutex_destroy(&write_lock);
|
||||
|
|
@ -211,7 +214,7 @@ interposer_thread (void *arg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef __WIN32__ /* Windows Process */
|
||||
#ifdef PLATFORM_WINDOWS /* Windows Process */
|
||||
|
||||
/* HELPER FUNCTIONS */
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ class SystemExec
|
|||
char **envp;
|
||||
|
||||
private:
|
||||
#ifdef __WIN32__
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
PROCESS_INFORMATION *pid;
|
||||
HANDLE stdinP[2];
|
||||
HANDLE stdoutP[2];
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ TranscodeFfmpeg::TranscodeFfmpeg (std::string f)
|
|||
#endif
|
||||
|
||||
std::string ff_file_path;
|
||||
if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("ffmpeg_harvid"), ff_file_path)) { ffmpeg_exe = ff_file_path; }
|
||||
if (find_file_in_search_path (Searchpath(Glib::getenv("PATH")), X_("ffmpeg_harvid"), ff_file_path)) { ffmpeg_exe = ff_file_path; }
|
||||
else if (Glib::file_test(X_("C:\\Program Files\\harvid\\ffmpeg.exe"), Glib::FILE_TEST_EXISTS)) {
|
||||
ffmpeg_exe = X_("C:\\Program Files\\ffmpeg\\ffmpeg.exe");
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ TranscodeFfmpeg::TranscodeFfmpeg (std::string f)
|
|||
ffmpeg_exe = X_("C:\\Program Files\\ffmpeg\\ffmpeg.exe");
|
||||
}
|
||||
|
||||
if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("ffprobe_harvid"), ff_file_path)) { ffprobe_exe = ff_file_path; }
|
||||
if (find_file_in_search_path (Searchpath(Glib::getenv("PATH")), X_("ffprobe_harvid"), ff_file_path)) { ffprobe_exe = ff_file_path; }
|
||||
else if (Glib::file_test(X_("C:\\Program Files\\harvid\\ffprobe.exe"), Glib::FILE_TEST_EXISTS)) {
|
||||
ffprobe_exe = X_("C:\\Program Files\\ffmpeg\\ffprobe.exe");
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ TranscodeFfmpeg::probe ()
|
|||
* SystemExec::Terminated is emitted and ffcmd set to NULL */
|
||||
int timeout = 300; // 1.5 sec
|
||||
while (ffcmd && --timeout > 0) {
|
||||
usleep(5000);
|
||||
Glib::usleep(5000);
|
||||
}
|
||||
if (timeout == 0 || ffoutput.empty()) {
|
||||
return false;
|
||||
|
|
@ -192,7 +192,7 @@ TranscodeFfmpeg::probe ()
|
|||
h * 3600.0
|
||||
+ m * 60.0
|
||||
+ s * 1.0
|
||||
+ atoi(f) / pow(10, strlen(f))
|
||||
+ atoi(f) / pow((double)10, (int)strlen(f))
|
||||
));
|
||||
}
|
||||
} else if (key == X_("duration_ts") && m_fps == 0 && timebase !=0 ) {
|
||||
|
|
@ -505,7 +505,11 @@ TranscodeFfmpeg::cancel ()
|
|||
{
|
||||
if (!ffcmd || !ffcmd->is_running()) { return;}
|
||||
ffcmd->write_to_stdin("q");
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
Sleep(1000);
|
||||
#else
|
||||
sleep (1);
|
||||
#endif
|
||||
if (ffcmd) {
|
||||
ffcmd->terminate();
|
||||
}
|
||||
|
|
@ -539,7 +543,7 @@ TranscodeFfmpeg::ffmpegparse_a (std::string d, size_t /* s */)
|
|||
h * 3600.0
|
||||
+ m * 60.0
|
||||
+ s * 1.0
|
||||
+ atoi(f) / pow(10, strlen(f))
|
||||
+ atoi(f) / pow((double)10, (int)strlen(f))
|
||||
));
|
||||
p = p * m_fps / 100.0;
|
||||
if (p > m_duration ) { p = m_duration; }
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
#include <sigc++/bind.h>
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/convert.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
|
|
@ -301,9 +303,9 @@ void
|
|||
TranscodeVideoDialog::finished ()
|
||||
{
|
||||
if (aborted) {
|
||||
unlink(path_entry.get_text().c_str());
|
||||
::g_unlink(path_entry.get_text().c_str());
|
||||
if (!audiofile.empty()) {
|
||||
unlink(audiofile.c_str());
|
||||
::g_unlink(audiofile.c_str());
|
||||
}
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ UIConfiguration::color_by_name (const std::string& name)
|
|||
}
|
||||
|
||||
// cerr << string_compose (_("Color %1 not found"), name) << endl;
|
||||
return RGBA_TO_UINT (random()%256,random()%256,random()%256,0xff);
|
||||
return RGBA_TO_UINT (g_random_int()%256,g_random_int()%256,g_random_int()%256,0xff);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ get_xpm (std::string name)
|
|||
{
|
||||
if (!xpm_map[name]) {
|
||||
|
||||
SearchPath spath(ARDOUR::ardour_data_search_path());
|
||||
Searchpath spath(ARDOUR::ardour_data_search_path());
|
||||
|
||||
spath.add_subdirectory_to_paths("pixmaps");
|
||||
|
||||
|
|
@ -594,7 +594,7 @@ get_icon_path (const char* cname)
|
|||
string name = cname;
|
||||
name += X_(".png");
|
||||
|
||||
SearchPath spath(ARDOUR::ardour_data_search_path());
|
||||
Searchpath spath(ARDOUR::ardour_data_search_path());
|
||||
|
||||
spath.add_subdirectory_to_paths("icons");
|
||||
|
||||
|
|
@ -741,7 +741,9 @@ set_pango_fontsize ()
|
|||
|
||||
/* FT2 rendering - used by GnomeCanvas, sigh */
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_new(), val/1024, val/1024);
|
||||
#endif
|
||||
|
||||
/* Cairo rendering, in case there is any */
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ http_get_thread (void *arg) {
|
|||
char *res = NULL;
|
||||
do {
|
||||
res=a3_curl_http_get(url, &status);
|
||||
if (status == 503) usleep(5000); // try-again
|
||||
if (status == 503) Glib::usleep(5000); // try-again
|
||||
} while (status == 503 && --timeout > 0);
|
||||
|
||||
if (status != 200 || !res) {
|
||||
|
|
@ -250,8 +250,8 @@ VideoImageFrame::http_download_done (char *data){
|
|||
}
|
||||
|
||||
exposeimg();
|
||||
/* don't request frames rapidly, wait after user has zoomed */
|
||||
usleep(20000);
|
||||
/* don't request frames too quickly, wait after user has zoomed */
|
||||
Glib::usleep(40000);
|
||||
|
||||
if (queued_request) {
|
||||
http_get_again(want_video_frame_number);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ VideoMonitor::query_full_state (bool wait)
|
|||
process->write_to_stdin("get osdcfg\n");
|
||||
int timeout = 40;
|
||||
if (wait && knownstate !=127 && --timeout) {
|
||||
usleep(50000);
|
||||
Glib::usleep(50000);
|
||||
sched_yield();
|
||||
}
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ VideoMonitor::quit ()
|
|||
*/
|
||||
int timeout = 40;
|
||||
while (is_started() && --timeout) {
|
||||
usleep(50000);
|
||||
Glib::usleep(50000);
|
||||
sched_yield();
|
||||
}
|
||||
if (timeout <= 0) {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@
|
|||
#include "ardour/template_utils.h"
|
||||
#include "ardour/session.h"
|
||||
|
||||
#ifdef interface
|
||||
#undef interface
|
||||
#endif
|
||||
|
||||
#include "video_server_dialog.h"
|
||||
#include "utils_videotl.h"
|
||||
#include "i18n.h"
|
||||
|
|
@ -80,7 +84,7 @@ VideoServerDialog::VideoServerDialog (Session* s)
|
|||
listenaddr_combo.set_active(0);
|
||||
|
||||
std::string icsd_file_path;
|
||||
if (find_file_in_search_path (PBD::SearchPath(Glib::getenv("PATH")), X_("harvid"), icsd_file_path)) {
|
||||
if (find_file_in_search_path (PBD::Searchpath(Glib::getenv("PATH")), X_("harvid"), icsd_file_path)) {
|
||||
path_entry.set_text(icsd_file_path);
|
||||
}
|
||||
else if (Glib::file_test(X_("C:\\Program Files\\harvid\\harvid.exe"), Glib::FILE_TEST_EXISTS)) {
|
||||
|
|
|
|||
|
|
@ -347,17 +347,17 @@ VideoTimeLine::update_video_timeline()
|
|||
assert (vtl_dist > 0);
|
||||
assert (apv > 0);
|
||||
|
||||
leftmost_video_frame = floor (floor((leftmost_sample - video_start_offset - video_offset ) / vtl_dist) * vtl_dist / apv);
|
||||
leftmost_video_frame = floor (floor((long double)(leftmost_sample - video_start_offset - video_offset ) / vtl_dist) * vtl_dist / apv);
|
||||
|
||||
vtl_start = rint (video_offset + video_start_offset + leftmost_video_frame * apv);
|
||||
visible_video_frames = 2 + ceil(editor->current_page_samples() / vtl_dist); /* +2 left+right partial frames */
|
||||
visible_video_frames = 2 + ceil((double)editor->current_page_samples() / vtl_dist); /* +2 left+right partial frames */
|
||||
|
||||
/* expand timeline (cache next/prev page images) */
|
||||
vtl_start -= visible_video_frames * vtl_dist;
|
||||
visible_video_frames *=3;
|
||||
|
||||
if (vtl_start < video_offset ) {
|
||||
visible_video_frames += ceil(vtl_start/vtl_dist);
|
||||
visible_video_frames += ceil((double)vtl_start/vtl_dist);
|
||||
vtl_start = video_offset;
|
||||
}
|
||||
|
||||
|
|
@ -717,7 +717,7 @@ VideoTimeLine::find_xjadeo () {
|
|||
std::string xjadeo_file_path;
|
||||
if (getenv("XJREMOTE")) {
|
||||
_xjadeo_bin = strdup(getenv("XJREMOTE")); // XXX TODO: free it?!
|
||||
} else if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("xjremote"), xjadeo_file_path)) {
|
||||
} else if (find_file_in_search_path (Searchpath(Glib::getenv("PATH")), X_("xjremote"), xjadeo_file_path)) {
|
||||
_xjadeo_bin = xjadeo_file_path;
|
||||
}
|
||||
else if (Glib::file_test(X_("/Applications/Jadeo.app/Contents/MacOS/xjremote"), Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_EXECUTABLE)) {
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ class ProxyWithConstructor: public ProxyBase {
|
|||
return 0;
|
||||
}
|
||||
|
||||
_window = creator ();
|
||||
_window = dynamic_cast<Gtk::Window*> (creator ());
|
||||
|
||||
if (_window) {
|
||||
setup ();
|
||||
|
|
|
|||
|
|
@ -260,8 +260,9 @@ def configure(conf):
|
|||
'', '')
|
||||
autowaf.configure(conf)
|
||||
|
||||
if re.search ("linux", sys.platform) != None:
|
||||
autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
|
||||
if Options.options.dist_target == 'auto':
|
||||
if re.search ("linux", sys.platform) != None:
|
||||
autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
|
||||
|
||||
# TODO: Insert a sanity check for on OS X to ensure CoreAudio is present
|
||||
|
||||
|
|
@ -433,6 +434,10 @@ def build(bld):
|
|||
obj.use += ' libappleutility'
|
||||
obj.includes += ['../libs']
|
||||
|
||||
if bld.env['build_target'] == 'mingw':
|
||||
if bld.env['DEBUG'] == False:
|
||||
obj.linkflags = ['-mwindows']
|
||||
|
||||
if bld.is_defined('HAVE_SUIL'):
|
||||
obj.source += [ 'lv2_plugin_ui.cc' ]
|
||||
obj.use += [ 'SUIL' ]
|
||||
|
|
|
|||
|
|
@ -53,10 +53,16 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
|
|||
/* called from non-RT context */
|
||||
|
||||
void parse (framecnt_t timestamp);
|
||||
int write (const MIDI::byte *msg, size_t msglen, MIDI::timestamp_t timestamp);
|
||||
int write (const MIDI::byte *msg, size_t msglen, MIDI::timestamp_t timestamp);
|
||||
int read (MIDI::byte *buf, size_t bufsize);
|
||||
void drain (int check_interval_usecs);
|
||||
int selectable () const { return xthread.selectable(); }
|
||||
int selectable () const {
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
return false;
|
||||
#else
|
||||
return xthread.selectable();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void set_process_thread (pthread_t);
|
||||
static pthread_t get_process_thread () { return _process_thread; }
|
||||
|
|
@ -67,8 +73,22 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
|
|||
MIDI::timestamp_t _last_write_timestamp;
|
||||
RingBuffer< Evoral::Event<double> > output_fifo;
|
||||
Evoral::EventRingBuffer<MIDI::timestamp_t> input_fifo;
|
||||
Glib::Threads::Mutex output_fifo_lock;
|
||||
CrossThreadChannel xthread;
|
||||
Glib::Threads::Mutex output_fifo_lock;
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
CrossThreadChannel xthread;
|
||||
#endif
|
||||
|
||||
int create_port ();
|
||||
|
||||
/** Channel used to signal to the MidiControlUI that input has arrived */
|
||||
|
||||
std::string _connections;
|
||||
PBD::ScopedConnection connect_connection;
|
||||
PBD::ScopedConnection halt_connection;
|
||||
void flush (void* jack_port_buffer);
|
||||
void jack_halted ();
|
||||
void make_connections ();
|
||||
void init (std::string const &, Flags);
|
||||
|
||||
void flush_output_fifo (pframes_t);
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public:
|
|||
virtual void clear_capture_marks() {}
|
||||
virtual bool one_of_several_channels () const { return false; }
|
||||
|
||||
virtual void flush () = 0;
|
||||
virtual int update_header (framepos_t when, struct tm&, time_t) = 0;
|
||||
virtual int flush_header () = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
namespace ARDOUR {
|
||||
|
||||
class Session;
|
||||
class Region;
|
||||
class AudioRegion;
|
||||
class Source;
|
||||
class AudioPlaylist;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace ARDOUR {
|
|||
* contain the user and system directories which may contain audio/MIDI
|
||||
* backends.
|
||||
*/
|
||||
PBD::SearchPath backend_search_path ();
|
||||
PBD::Searchpath backend_search_path ();
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
||||
|
|
|
|||
|
|
@ -20,14 +20,22 @@
|
|||
#ifndef __ardour_butler_h__
|
||||
#define __ardour_butler_h__
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#include "pbd/glib_semaphore.h"
|
||||
#endif
|
||||
|
||||
#include "pbd/ringbuffer.h"
|
||||
#include "pbd/pool.h"
|
||||
#include "ardour/libardour_visibility.h"
|
||||
#include "ardour/types.h"
|
||||
#include "ardour/session_handle.h"
|
||||
|
||||
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
/**
|
||||
|
|
@ -72,15 +80,43 @@ class LIBARDOUR_API Butler : public SessionHandleRef
|
|||
Glib::Threads::Cond paused;
|
||||
bool should_run;
|
||||
mutable gint should_do_transport_work;
|
||||
int request_pipe[2];
|
||||
framecnt_t audio_dstream_capture_buffer_size;
|
||||
framecnt_t audio_dstream_playback_buffer_size;
|
||||
uint32_t midi_dstream_buffer_size;
|
||||
RingBuffer<CrossThreadPool*> pool_trash;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
PBD::atomic_counter m_request_state;
|
||||
PBD::GlibSemaphore m_request_sem;
|
||||
#else
|
||||
int request_pipe[2];
|
||||
#endif
|
||||
|
||||
private:
|
||||
void empty_pool_trash ();
|
||||
void config_changed (std::string);
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
int setup_request_pipe ();
|
||||
#endif
|
||||
|
||||
/**
|
||||
* return true if there are requests to be processed
|
||||
*/
|
||||
bool wait_for_requests ();
|
||||
|
||||
/**
|
||||
* Remove request from butler request queue
|
||||
*
|
||||
* return true if there was another request and req is valid
|
||||
*/
|
||||
bool dequeue_request (Request::Type& req);
|
||||
|
||||
/**
|
||||
* Add request to butler thread request queue
|
||||
*/
|
||||
void queue_request (Request::Type r);
|
||||
|
||||
};
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@
|
|||
#include "pbd/xml++.h"
|
||||
#include "ardour/data_type.h"
|
||||
|
||||
#ifdef INFINITE
|
||||
#undef INFINITE
|
||||
#endif
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@
|
|||
namespace ARDOUR {
|
||||
|
||||
/**
|
||||
* return a SearchPath containing directories in which to look for
|
||||
* return a Searchpath containing directories in which to look for
|
||||
* control surface plugins.
|
||||
*
|
||||
* If ARDOUR_SURFACES_PATH is defined then the SearchPath returned
|
||||
* If ARDOUR_SURFACES_PATH is defined then the Searchpath returned
|
||||
* will contain only those directories specified in it, otherwise it will
|
||||
* contain the user and system directories which may contain control
|
||||
* surface plugins.
|
||||
*/
|
||||
PBD::SearchPath control_protocol_search_path ();
|
||||
PBD::Searchpath control_protocol_search_path ();
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ class LIBARDOUR_API CoreAudioSource : public AudioFileSource {
|
|||
void set_header_timeline_position () {};
|
||||
bool clamped_at_unity () const { return false; }
|
||||
|
||||
void flush () {}
|
||||
|
||||
static int get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -216,7 +216,10 @@ static inline cycles_t get_cycles (void)
|
|||
|
||||
/* debian: sparc, arm, m68k */
|
||||
|
||||
#ifndef COMPILER_MSVC
|
||||
/* GRRR... Annoyingly, #warning aborts the compilation for MSVC !! */
|
||||
#warning You are compiling libardour on a platform for which ardour/cycles.h needs work
|
||||
#endif
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@
|
|||
namespace ARDOUR {
|
||||
|
||||
/**
|
||||
* return a SearchPath containing directories in which to look for
|
||||
* return a Searchpath containing directories in which to look for
|
||||
* export_formats.
|
||||
*/
|
||||
PBD::SearchPath export_formats_search_path ();
|
||||
PBD::Searchpath export_formats_search_path ();
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class LIBARDOUR_API ExportProfileManager
|
|||
std::vector<std::string> find_file (std::string const & pattern);
|
||||
|
||||
std::string export_config_dir;
|
||||
PBD::SearchPath search_path;
|
||||
PBD::Searchpath search_path;
|
||||
|
||||
/* Timespans */
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
virtual void set_path (const std::string&);
|
||||
|
||||
static PBD::Signal3<int,std::string,std::string,std::vector<std::string> > AmbiguousFileName;
|
||||
static PBD::Signal2<int,std::string,std::vector<std::string> > AmbiguousFileName;
|
||||
|
||||
protected:
|
||||
FileSource (Session& session, DataType type,
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@ namespace ARDOUR {
|
|||
* @return the search path to be used when looking for per-system
|
||||
* configuration files. This may include user configuration files.
|
||||
*/
|
||||
LIBARDOUR_API PBD::SearchPath ardour_config_search_path ();
|
||||
LIBARDOUR_API PBD::Searchpath ardour_config_search_path ();
|
||||
|
||||
/**
|
||||
* @return the search path to be used when looking for data files
|
||||
* that could be shared by systems (h/w and configuration independent
|
||||
* files, such as icons, XML files, etc)
|
||||
*/
|
||||
LIBARDOUR_API PBD::SearchPath ardour_data_search_path ();
|
||||
LIBARDOUR_API PBD::Searchpath ardour_data_search_path ();
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace ARDOUR {
|
|||
|
||||
class InterThreadInfo {
|
||||
public:
|
||||
InterThreadInfo () : done (false), cancel (false), progress (0), thread (0) {}
|
||||
InterThreadInfo () : done (false), cancel (false), progress (0), thread () {}
|
||||
|
||||
volatile bool done;
|
||||
volatile bool cancel;
|
||||
|
|
|
|||
253
libs/ardour/ardour/jack_utils.h
Normal file
253
libs/ardour/ardour/jack_utils.h
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
/*
|
||||
Copyright (C) 2011 Tim Mayberry
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
// Names for the drivers on all possible systems
|
||||
extern const char * const portaudio_driver_name;
|
||||
extern const char * const coreaudio_driver_name;
|
||||
extern const char * const alsa_driver_name;
|
||||
extern const char * const oss_driver_name;
|
||||
extern const char * const freebob_driver_name;
|
||||
extern const char * const ffado_driver_name;
|
||||
extern const char * const netjack_driver_name;
|
||||
extern const char * const dummy_driver_name;
|
||||
|
||||
/**
|
||||
* Get a list of possible JACK audio driver names based on platform
|
||||
*/
|
||||
void get_jack_audio_driver_names (std::vector<std::string>& driver_names);
|
||||
|
||||
/**
|
||||
* Get the default JACK audio driver based on platform
|
||||
*/
|
||||
void get_jack_default_audio_driver_name (std::string& driver_name);
|
||||
|
||||
/**
|
||||
* Get a list of possible JACK midi driver names based on platform
|
||||
*/
|
||||
void get_jack_midi_system_names (const std::string& driver, std::vector<std::string>& driver_names);
|
||||
|
||||
/**
|
||||
* Get the default JACK midi driver based on platform
|
||||
*/
|
||||
void get_jack_default_midi_system_name (const std::string& driver_name, std::string& midi_system);
|
||||
|
||||
/**
|
||||
* Get a list of possible samplerates supported be JACK
|
||||
*/
|
||||
void get_jack_sample_rate_strings (std::vector<std::string>& sample_rates);
|
||||
|
||||
/**
|
||||
* @return The default samplerate
|
||||
*/
|
||||
std::string get_jack_default_sample_rate ();
|
||||
|
||||
/**
|
||||
* @return true if sample rate string was able to be converted
|
||||
*/
|
||||
bool get_jack_sample_rate_value_from_string (const std::string& srs, uint32_t& srv);
|
||||
|
||||
/**
|
||||
* Get a list of possible period sizes supported be JACK
|
||||
*/
|
||||
void get_jack_period_size_strings (std::vector<std::string>& samplerates);
|
||||
|
||||
/**
|
||||
* @return The default period size
|
||||
*/
|
||||
std::string get_jack_default_period_size ();
|
||||
|
||||
/**
|
||||
* @return true if period size string was able to be converted
|
||||
*/
|
||||
bool get_jack_period_size_value_from_string (const std::string& pss, uint32_t& psv);
|
||||
|
||||
/**
|
||||
* These are driver specific I think, so it may require a driver arg
|
||||
* in future
|
||||
*/
|
||||
void get_jack_dither_mode_strings (const std::string& driver, std::vector<std::string>& dither_modes);
|
||||
|
||||
/**
|
||||
* @return The default dither mode
|
||||
*/
|
||||
std::string get_jack_default_dither_mode (const std::string& driver);
|
||||
|
||||
/**
|
||||
* @return Estimate of latency
|
||||
*
|
||||
* API matches current use in GUI
|
||||
*/
|
||||
std::string get_jack_latency_string (std::string samplerate, float periods, std::string period_size);
|
||||
|
||||
/**
|
||||
* @return true if a JACK server is running
|
||||
*/
|
||||
bool jack_server_running ();
|
||||
|
||||
/**
|
||||
* Key being a readable name to display in a GUI
|
||||
* Value being name used in a jack commandline
|
||||
*/
|
||||
typedef std::map<std::string, std::string> device_map_t;
|
||||
|
||||
/**
|
||||
* Use library specific code to find out what what devices exist for a given
|
||||
* driver that might work in JACK. There is no easy way to find out what
|
||||
* modules the JACK server supports so guess based on platform. For instance
|
||||
* portaudio is cross-platform but we only return devices if built for
|
||||
* windows etc
|
||||
*/
|
||||
void get_jack_alsa_device_names (device_map_t& devices);
|
||||
void get_jack_portaudio_device_names (device_map_t& devices);
|
||||
void get_jack_coreaudio_device_names (device_map_t& devices);
|
||||
void get_jack_oss_device_names (device_map_t& devices);
|
||||
void get_jack_freebob_device_names (device_map_t& devices);
|
||||
void get_jack_ffado_device_names (device_map_t& devices);
|
||||
void get_jack_netjack_device_names (device_map_t& devices);
|
||||
void get_jack_dummy_device_names (device_map_t& devices);
|
||||
|
||||
/*
|
||||
* @return true if there were devices found for the driver
|
||||
*
|
||||
* @param driver The driver name returned by get_jack_audio_driver_names
|
||||
* @param devices The map used to insert the drivers into, devices will be cleared before
|
||||
* adding the available drivers
|
||||
*/
|
||||
bool get_jack_device_names_for_audio_driver (const std::string& driver, device_map_t& devices);
|
||||
|
||||
/*
|
||||
* @return a list of readable device names for a specific driver.
|
||||
*/
|
||||
std::vector<std::string> get_jack_device_names_for_audio_driver (const std::string& driver);
|
||||
|
||||
/**
|
||||
* @return true if the driver supports playback and recording
|
||||
* on separate devices
|
||||
*/
|
||||
bool get_jack_audio_driver_supports_two_devices (const std::string& driver);
|
||||
|
||||
bool get_jack_audio_driver_supports_latency_adjustment (const std::string& driver);
|
||||
|
||||
bool get_jack_audio_driver_supports_setting_period_count (const std::string& driver);
|
||||
|
||||
/**
|
||||
* The possible names to use to try and find servers, this includes
|
||||
* any file extensions like .exe on Windows
|
||||
*
|
||||
* @return true if the JACK application names for this platform could be guessed
|
||||
*/
|
||||
bool get_jack_server_application_names (std::vector<std::string>& server_names);
|
||||
|
||||
/**
|
||||
* Sets the PATH environment variable to contain directories likely to contain
|
||||
* JACK servers so that if the JACK server is auto-started it can find the server
|
||||
* executable.
|
||||
*
|
||||
* This is only modifies PATH on the mac at the moment.
|
||||
*/
|
||||
void set_path_env_for_jack_autostart (const std::vector<std::string>&);
|
||||
|
||||
/**
|
||||
* Get absolute paths to directories that might contain JACK servers on the system
|
||||
*
|
||||
* @return true if !server_paths.empty()
|
||||
*/
|
||||
bool get_jack_server_dir_paths (std::vector<std::string>& server_dir_paths);
|
||||
|
||||
/**
|
||||
* Get absolute paths to JACK servers on the system
|
||||
*
|
||||
* @return true if a server was found
|
||||
*/
|
||||
bool get_jack_server_paths (const std::vector<std::string>& server_dir_paths,
|
||||
const std::vector<std::string>& server_names,
|
||||
std::vector<std::string>& server_paths);
|
||||
|
||||
|
||||
bool get_jack_server_paths (std::vector<std::string>& server_paths);
|
||||
|
||||
/**
|
||||
* Get absolute path to default JACK server
|
||||
*/
|
||||
bool get_jack_default_server_path (std::string& server_path);
|
||||
|
||||
/**
|
||||
* @return The name of the jack server config file
|
||||
*/
|
||||
std::string get_jack_server_config_file_name ();
|
||||
|
||||
std::string get_jack_server_user_config_dir_path ();
|
||||
|
||||
std::string get_jack_server_user_config_file_path ();
|
||||
|
||||
bool write_jack_config_file (const std::string& config_file_path, const std::string& command_line);
|
||||
|
||||
struct JackCommandLineOptions {
|
||||
|
||||
// see implementation for defaults
|
||||
JackCommandLineOptions ();
|
||||
|
||||
//operator bool
|
||||
//operator ostream
|
||||
|
||||
std::string server_path;
|
||||
uint32_t timeout;
|
||||
bool no_mlock;
|
||||
uint32_t ports_max;
|
||||
bool realtime;
|
||||
uint32_t priority;
|
||||
bool unlock_gui_libs;
|
||||
bool verbose;
|
||||
bool temporary;
|
||||
bool playback_only;
|
||||
bool capture_only;
|
||||
std::string driver;
|
||||
std::string input_device;
|
||||
std::string output_device;
|
||||
uint32_t num_periods;
|
||||
uint32_t period_size;
|
||||
uint32_t samplerate;
|
||||
uint32_t input_latency;
|
||||
uint32_t output_latency;
|
||||
bool hardware_metering;
|
||||
bool hardware_monitoring;
|
||||
std::string dither_mode;
|
||||
bool force16_bit;
|
||||
bool soft_mode;
|
||||
std::string midi_driver;
|
||||
};
|
||||
|
||||
/**
|
||||
* @return true if able to build a valid command line based on options
|
||||
*/
|
||||
bool get_jack_command_line_string (const JackCommandLineOptions& options, std::string& command_line);
|
||||
|
||||
/**
|
||||
* We don't need this at the moment because the gui stores all its settings
|
||||
*/
|
||||
//std::string get_jack_command_line_from_config_file (const std::string& config_file_path);
|
||||
}
|
||||
|
|
@ -23,8 +23,8 @@
|
|||
#include <set>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <glibmm/module.h>
|
||||
|
||||
#include "pbd/stateful.h"
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ class Session;
|
|||
class LIBARDOUR_API LadspaPlugin : public ARDOUR::Plugin
|
||||
{
|
||||
public:
|
||||
LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, framecnt_t sample_rate);
|
||||
LadspaPlugin (std::string module_path, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, framecnt_t sample_rate);
|
||||
LadspaPlugin (const LadspaPlugin &);
|
||||
~LadspaPlugin ();
|
||||
|
||||
|
|
@ -122,7 +122,8 @@ class LIBARDOUR_API LadspaPlugin : public ARDOUR::Plugin
|
|||
void connect_port (uint32_t port, float *ptr) { _descriptor->connect_port (_handle, port, ptr); }
|
||||
|
||||
private:
|
||||
void* _module;
|
||||
std::string _module_path;
|
||||
Glib::Module* _module;
|
||||
const LADSPA_Descriptor* _descriptor;
|
||||
LADSPA_Handle _handle;
|
||||
framecnt_t _sample_rate;
|
||||
|
|
@ -134,7 +135,7 @@ class LIBARDOUR_API LadspaPlugin : public ARDOUR::Plugin
|
|||
|
||||
void find_presets ();
|
||||
|
||||
void init (void *mod, uint32_t index, framecnt_t rate);
|
||||
void init (std::string module_path, uint32_t index, framecnt_t rate);
|
||||
void run_in_place (pframes_t nsamples);
|
||||
void latency_compute_run ();
|
||||
int set_state_2X (const XMLNode&, int version);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue