aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/portaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-08-17 13:38:52 -0700
committerChris Robinson <[email protected]>2012-08-17 13:38:52 -0700
commitac4fc4026c3b1b0b9487216399bef04d419b04b8 (patch)
tree730148652e49723e644f7df8107c0c3be3c19821 /Alc/backends/portaudio.c
parent9737f683150180a5531d276959030ffa0bd35492 (diff)
Add a device method to retrieve the active latency
This is effectively the time until the next update will be heard by the user, or the closest approximation thereof, in nanoseconds.
Diffstat (limited to 'Alc/backends/portaudio.c')
-rw-r--r--Alc/backends/portaudio.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c
index b9998150..1558e89f 100644
--- a/Alc/backends/portaudio.c
+++ b/Alc/backends/portaudio.c
@@ -419,6 +419,13 @@ static ALCuint pa_available_samples(ALCdevice *device)
}
+static ALint64 pa_get_latency(ALCdevice *device)
+{
+ (void)device;
+ return 0;
+}
+
+
static const BackendFuncs pa_funcs = {
pa_open_playback,
pa_close_playback,
@@ -430,7 +437,8 @@ static const BackendFuncs pa_funcs = {
pa_start_capture,
pa_stop_capture,
pa_capture_samples,
- pa_available_samples
+ pa_available_samples,
+ pa_get_latency
};
ALCboolean alc_pa_init(BackendFuncs *func_list)