From 551a18a15c66440e3a5478c8b3d6b973f36c33d3 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 3 Nov 2022 03:09:30 -0700 Subject: Add functions to start sources at a particular device time This starts a source at a particular device clock time, rounded to the nearest sample (really, 4th sample for SIMD reasons), allowing to start a sound at a particular point in the output instead of the next update. Unlike using negative offsets, this is not affected by pitch/velocity. --- alc/inprogext.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'alc/inprogext.h') diff --git a/alc/inprogext.h b/alc/inprogext.h index 9af80f12..5dfc22cb 100644 --- a/alc/inprogext.h +++ b/alc/inprogext.h @@ -54,6 +54,15 @@ AL_API void AL_APIENTRY alAuxiliaryEffectSlotStopvSOFT(ALsizei n, const ALuint * #define AL_STOP_SOURCES_ON_DISCONNECT_SOFT 0x19AB #endif +#ifndef AL_SOFT_source_start_delay +#define AL_SOFT_source_start_delay +typedef void (AL_APIENTRY*LPALSOURCEPLAYATTIMESOFT)(ALuint source, ALint64SOFT start_time); +typedef void (AL_APIENTRY*LPALSOURCEPLAYATTIMEVSOFT)(ALsizei n, const ALuint *sources, ALint64SOFT start_time); +#ifdef AL_ALEXT_PROTOTYPES +void AL_APIENTRY alSourcePlayAtTimeSOFT(ALuint source, ALint64SOFT start_time); +void AL_APIENTRY alSourcePlayAtTimevSOFT(ALsizei n, const ALuint *sources, ALint64SOFT start_time); +#endif +#endif /* Non-standard export. Not part of any extension. */ AL_API const ALchar* AL_APIENTRY alsoft_get_version(void); -- cgit v1.2.3