diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-07-26 12:15:12 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-07-27 08:28:02 +0200 |
| commit | 839c9712b0d86e13051acad0b273df24172dc430 (patch) | |
| tree | 6339e83adeddac520bfd3a5edd2839e7ec5e4174 | |
| parent | 98b7a493933a5a47c6e1abb21ef2710ad2730a0e (diff) | |
Fix build with RtAudio 6.
| -rw-r--r-- | src/wx/audio_backend.cc | 10 | ||||
| -rw-r--r-- | src/wx/audio_backend.h | 1 | ||||
| -rw-r--r-- | src/wx/film_viewer.cc | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/wx/audio_backend.cc b/src/wx/audio_backend.cc index 9c8b1c386..68bc06004 100644 --- a/src/wx/audio_backend.cc +++ b/src/wx/audio_backend.cc @@ -20,11 +20,15 @@ #include "audio_backend.h" +#include <boost/bind/bind.hpp> using std::string; using std::vector; using boost::optional; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif AudioBackend* AudioBackend::_instance = nullptr; @@ -86,8 +90,8 @@ AudioBackend::output_device_names() vector<string> names; #if (RTAUDIO_VERSION_MAJOR >= 6) - for (auto device_id: audio.getDeviceIds()) { - auto dev = audio.getDeviceInfo(device_id); + for (auto device_id: _rtaudio.getDeviceIds()) { + auto dev = _rtaudio.getDeviceInfo(device_id); if (dev.outputChannels > 0) { names.push_back(dev.name); } @@ -130,7 +134,7 @@ AudioBackend::device_output_channels(string name) { #if (RTAUDIO_VERSION_MAJOR >= 6) for (auto device_id: _rtaudio.getDeviceIds()) { - auto info = audio.getDeviceInfo(device_id); + auto info = _rtaudio.getDeviceInfo(device_id); if (info.name == name) { return info.outputChannels; } diff --git a/src/wx/audio_backend.h b/src/wx/audio_backend.h index aa4adf13c..faca6eb0a 100644 --- a/src/wx/audio_backend.h +++ b/src/wx/audio_backend.h @@ -24,6 +24,7 @@ LIBDCP_DISABLE_WARNINGS #include <RtAudio.h> LIBDCP_ENABLE_WARNINGS #include <boost/optional.hpp> +#include <boost/thread/mutex.hpp> diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 1876aac74..7a3d58734 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -602,7 +602,8 @@ FilmViewer::config_changed (Config::Property p) return; } - auto& audio = AudioBackend::instance()->rtaudio(); + auto backend = AudioBackend::instance(); + auto& audio = backend->rtaudio(); if (audio.isStreamOpen()) { audio.closeStream(); @@ -632,7 +633,7 @@ FilmViewer::config_changed (Config::Property p) _audio_channels = 0; error_dialog( _video_view->get(), - _("Could not set up audio output. There will be no audio during the preview."), std_to_wx(audio.last_rtaudio_error()) + _("Could not set up audio output. There will be no audio during the preview."), std_to_wx(backend->last_rtaudio_error()) ); } #else |
