aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/null.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-07-24 19:14:32 -0700
committerChris Robinson <[email protected]>2010-07-24 19:14:32 -0700
commit40dd1fb85364e3a9e278ffa7a034638e7718770b (patch)
treeb4da0f38e57498b1c2e4b44986814f7e58d92ef6 /Alc/null.c
parentab77fc14d53993e90403dd3474725a6202f623c4 (diff)
Add a backend callback to get the device time
The method should monotonically count the number of nanoseconds the device has active contexts
Diffstat (limited to 'Alc/null.c')
-rw-r--r--Alc/null.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Alc/null.c b/Alc/null.c
index 86726fc3..be760e7d 100644
--- a/Alc/null.c
+++ b/Alc/null.c
@@ -144,6 +144,11 @@ static ALCboolean null_open_capture(ALCdevice *device, const ALCchar *deviceName
return ALC_FALSE;
}
+static ALuint64 null_get_time(ALCdevice *Device)
+{
+ return Device->SamplesPlayed * 1000000000 / Device->Frequency;
+}
+
BackendFuncs null_funcs = {
null_open_playback,
@@ -155,7 +160,8 @@ BackendFuncs null_funcs = {
NULL,
NULL,
NULL,
- NULL
+ NULL,
+ null_get_time
};
void alc_null_init(BackendFuncs *func_list)