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:26:55 +0200 |
| commit | e9f4e040fcad377debfcf6c849bb8f8778b08591 (patch) | |
| tree | d96fd9fcc24cd434a8932ea339c998de25e01264 /src | |
| parent | b607a42e43df747007b6e0c3663ac39eaa0b4742 (diff) | |
Fix build.rtaudio6
Diffstat (limited to 'src')
| -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 13bc5b579..9edd4578e 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -603,7 +603,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(); @@ -633,7 +634,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 |
