Use a default method to provide a dummy latency

This commit is contained in:
Chris Robinson
2012-08-19 12:31:59 -07:00
parent 0db7c4131b
commit 37924887e8
14 changed files with 18 additions and 98 deletions
+5
View File
@@ -1267,6 +1267,11 @@ void ALCdevice_UnlockDefault(ALCdevice *device)
{
LeaveCriticalSection(&device->Mutex);
}
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device)
{
(void)device;
return 0;
}
/* SetDefaultWFXChannelOrder
*
+1 -8
View File
@@ -663,13 +663,6 @@ static ALCuint ca_available_samples(ALCdevice *device)
}
static ALint64 ca_get_latency(ALCdevice *device)
{
(void)device;
return 0;
}
static const BackendFuncs ca_funcs = {
ca_open_playback,
ca_close_playback,
@@ -684,7 +677,7 @@ static const BackendFuncs ca_funcs = {
ca_available_samples,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
ca_get_latency
ALCdevice_GetLatencyDefault
};
ALCboolean alc_ca_init(BackendFuncs *func_list)
+1 -8
View File
@@ -935,13 +935,6 @@ done:
}
static ALint64 DSoundGetLatency(ALCdevice *device)
{
(void)device;
return 0;
}
static const BackendFuncs DSoundFuncs = {
DSoundOpenPlayback,
DSoundClosePlayback,
@@ -956,7 +949,7 @@ static const BackendFuncs DSoundFuncs = {
DSoundAvailableSamples,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
DSoundGetLatency
ALCdevice_GetLatencyDefault
};
+1 -8
View File
@@ -55,13 +55,6 @@ static void loopback_stop_playback(ALCdevice *device)
}
static ALint64 loopback_get_latency(ALCdevice *device)
{
(void)device;
return 0;
}
static const BackendFuncs loopback_funcs = {
loopback_open_playback,
loopback_close_playback,
@@ -76,7 +69,7 @@ static const BackendFuncs loopback_funcs = {
NULL,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
loopback_get_latency
ALCdevice_GetLatencyDefault
};
ALCboolean alc_loopback_init(BackendFuncs *func_list)
+1 -8
View File
@@ -937,13 +937,6 @@ static void MMDevApiStopPlayback(ALCdevice *device)
}
static ALint64 MMDevApiGetLatency(ALCdevice *device)
{
(void)device;
return 0;
}
static const BackendFuncs MMDevApiFuncs = {
MMDevApiOpenPlayback,
MMDevApiClosePlayback,
@@ -958,7 +951,7 @@ static const BackendFuncs MMDevApiFuncs = {
NULL,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
MMDevApiGetLatency
ALCdevice_GetLatencyDefault
};
+1 -9
View File
@@ -129,14 +129,6 @@ static void null_stop_playback(ALCdevice *device)
}
static ALint64 null_get_latency(ALCdevice *device)
{
/* FIXME: Time until next update + "safe" offset */
(void)device;
return 0;
}
static const BackendFuncs null_funcs = {
null_open_playback,
null_close_playback,
@@ -151,7 +143,7 @@ static const BackendFuncs null_funcs = {
NULL,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
null_get_latency
ALCdevice_GetLatencyDefault
};
ALCboolean alc_null_init(BackendFuncs *func_list)
+1 -8
View File
@@ -401,13 +401,6 @@ static void opensl_stop_playback(ALCdevice *Device)
}
static ALint64 opensl_get_latency(ALCdevice *device)
{
(void)device;
return 0;
}
static const BackendFuncs opensl_funcs = {
opensl_open_playback,
opensl_close_playback,
@@ -422,7 +415,7 @@ static const BackendFuncs opensl_funcs = {
NULL,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
opensl_get_latency
ALCdevice_GetLatencyDefault
};
+1 -8
View File
@@ -476,13 +476,6 @@ static ALCuint oss_available_samples(ALCdevice *Device)
}
static ALint64 oss_get_latency(ALCdevice *device)
{
(void)device;
return 0;
}
static const BackendFuncs oss_funcs = {
oss_open_playback,
oss_close_playback,
@@ -497,7 +490,7 @@ static const BackendFuncs oss_funcs = {
oss_available_samples,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
oss_get_latency
ALCdevice_GetLatencyDefault
};
ALCboolean alc_oss_init(BackendFuncs *func_list)
+1 -8
View File
@@ -419,13 +419,6 @@ 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,
@@ -440,7 +433,7 @@ static const BackendFuncs pa_funcs = {
pa_available_samples,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
pa_get_latency
ALCdevice_GetLatencyDefault
};
ALCboolean alc_pa_init(BackendFuncs *func_list)
+1 -8
View File
@@ -252,13 +252,6 @@ static void sndio_stop_playback(ALCdevice *device)
}
static ALint64 sndio_get_latency(ALCdevice *device)
{
(void)device;
return 0;
}
static const BackendFuncs sndio_funcs = {
sndio_open_playback,
sndio_close_playback,
@@ -273,7 +266,7 @@ static const BackendFuncs sndio_funcs = {
NULL,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
sndio_get_latency
ALCdevice_GetLatencyDefault
};
ALCboolean alc_sndio_init(BackendFuncs *func_list)
+1 -8
View File
@@ -236,13 +236,6 @@ static void solaris_stop_playback(ALCdevice *device)
}
static ALint64 solaris_get_latency(ALCdevice *device)
{
(void)device;
return 0;
}
static const BackendFuncs solaris_funcs = {
solaris_open_playback,
solaris_close_playback,
@@ -257,7 +250,7 @@ static const BackendFuncs solaris_funcs = {
NULL,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
solaris_get_latency
ALCdevice_GetLatencyDefault
};
ALCboolean alc_solaris_init(BackendFuncs *func_list)
+1 -9
View File
@@ -322,14 +322,6 @@ static void wave_stop_playback(ALCdevice *device)
}
static ALint64 wave_get_latency(ALCdevice *device)
{
/* FIXME: time until next update + "safe" offset */
(void)device;
return 0;
}
static const BackendFuncs wave_funcs = {
wave_open_playback,
wave_close_playback,
@@ -344,7 +336,7 @@ static const BackendFuncs wave_funcs = {
NULL,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
wave_get_latency
ALCdevice_GetLatencyDefault
};
ALCboolean alc_wave_init(BackendFuncs *func_list)
+1 -8
View File
@@ -705,13 +705,6 @@ static ALCuint WinMMAvailableSamples(ALCdevice *Device)
}
static ALint64 WinMMGetLatency(ALCdevice *device)
{
(void)device;
return 0;
}
static const BackendFuncs WinMMFuncs = {
WinMMOpenPlayback,
WinMMClosePlayback,
@@ -726,7 +719,7 @@ static const BackendFuncs WinMMFuncs = {
WinMMAvailableSamples,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
WinMMGetLatency
ALCdevice_GetLatencyDefault
};
ALCboolean alcWinMMInit(BackendFuncs *FuncList)
+1
View File
@@ -710,6 +710,7 @@ void AppendCaptureDeviceList(const ALCchar *name);
void ALCdevice_LockDefault(ALCdevice *device);
void ALCdevice_UnlockDefault(ALCdevice *device);
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device);
static __inline void LockContext(ALCcontext *context)
{ ALCdevice_Lock(context->Device); }