summaryrefslogtreecommitdiff
path: root/src/wx/audio_backend.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-09-11 02:04:49 +0200
committerCarl Hetherington <cth@carlh.net>2024-09-11 02:04:49 +0200
commit88bf4891b813b5fbf14b3073200429d2c12f751b (patch)
tree74da3e945f070b169a0db1ef9b8c79f8d8071273 /src/wx/audio_backend.h
parenta405989c24016b543702640006170ce3d5089ecb (diff)
other stuff.more-abstract
Diffstat (limited to 'src/wx/audio_backend.h')
-rw-r--r--src/wx/audio_backend.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/wx/audio_backend.h b/src/wx/audio_backend.h
index 170c71e05..05d1a06b5 100644
--- a/src/wx/audio_backend.h
+++ b/src/wx/audio_backend.h
@@ -23,6 +23,7 @@
LIBDCP_DISABLE_WARNINGS
#include <RtAudio.h>
LIBDCP_ENABLE_WARNINGS
+#include <wx/wx.h>
#include <boost/optional.hpp>
#include <boost/thread/mutex.hpp>
@@ -36,16 +37,23 @@ public:
AudioBackend(AudioBackend const&) = delete;
AudioBackend& operator=(AudioBackend const&) = delete;
- RtAudio& rtaudio() {
- return _rtaudio;
- }
-
std::vector<std::string> device_names();
boost::optional<std::string> default_device_name();
boost::optional<int> device_channels(std::string name);
- void abort_stream_if_running();
+ bool open_stream(RtAudioCallback callback, void* context, int* channels, unsigned int* block_size, boost::optional<std::string> output);
boost::optional<std::string> start_stream();
+ void abort_stream_if_running();
+ void close_stream();
+
+ bool stream_open() const;
+ bool stream_running() const;
+ double stream_time() const;
+ int64_t stream_latency() const;
+
+ void set_stream_time(double time);
+
+ wxString current_api_name() const;
#if (RTAUDIO_VERSION_MAJOR >= 6)
std::string last_error() const;