Disable SDL audio capture until prebuilt SDL libraries are updated to 2.0.8.
This commit is contained in:
parent
78c70d0afc
commit
8bd2c79109
1 changed files with 12 additions and 0 deletions
|
@ -49,7 +49,9 @@ static SDL_AudioDeviceID sdlPlaybackDevice;
|
||||||
|
|
||||||
#ifdef USE_VOIP
|
#ifdef USE_VOIP
|
||||||
static SDL_AudioDeviceID sdlCaptureDevice;
|
static SDL_AudioDeviceID sdlCaptureDevice;
|
||||||
|
#if 0 // !!! FIXME: reenable after updating prebuild SDL libraries to 2.0.8!
|
||||||
static cvar_t *s_sdlCapture;
|
static cvar_t *s_sdlCapture;
|
||||||
|
#endif
|
||||||
static float sdlMasterGain = 1.0f;
|
static float sdlMasterGain = 1.0f;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -282,6 +284,7 @@ qboolean SNDDMA_Init(void)
|
||||||
dma.buffer = calloc(1, dmasize);
|
dma.buffer = calloc(1, dmasize);
|
||||||
|
|
||||||
#ifdef USE_VOIP
|
#ifdef USE_VOIP
|
||||||
|
#if 0 // !!! FIXME: reenable after updating prebuild SDL libraries to 2.0.8!
|
||||||
// !!! FIXME: some of these SDL_OpenAudioDevice() values should be cvars.
|
// !!! FIXME: some of these SDL_OpenAudioDevice() values should be cvars.
|
||||||
s_sdlCapture = Cvar_Get( "s_sdlCapture", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
s_sdlCapture = Cvar_Get( "s_sdlCapture", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
if (!s_sdlCapture->integer)
|
if (!s_sdlCapture->integer)
|
||||||
|
@ -307,6 +310,7 @@ qboolean SNDDMA_Init(void)
|
||||||
Com_Printf( "SDL capture device %s.\n",
|
Com_Printf( "SDL capture device %s.\n",
|
||||||
(sdlCaptureDevice == 0) ? "failed to open" : "opened");
|
(sdlCaptureDevice == 0) ? "failed to open" : "opened");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sdlMasterGain = 1.0f;
|
sdlMasterGain = 1.0f;
|
||||||
|
@ -387,27 +391,35 @@ void SNDDMA_BeginPainting (void)
|
||||||
#ifdef USE_VOIP
|
#ifdef USE_VOIP
|
||||||
void SNDDMA_StartCapture(void)
|
void SNDDMA_StartCapture(void)
|
||||||
{
|
{
|
||||||
|
#if 0 // !!! FIXME: reenable after updating prebuild SDL libraries to 2.0.8!
|
||||||
if (sdlCaptureDevice)
|
if (sdlCaptureDevice)
|
||||||
{
|
{
|
||||||
SDL_ClearQueuedAudio(sdlCaptureDevice);
|
SDL_ClearQueuedAudio(sdlCaptureDevice);
|
||||||
SDL_PauseAudioDevice(sdlCaptureDevice, 0);
|
SDL_PauseAudioDevice(sdlCaptureDevice, 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int SNDDMA_AvailableCaptureSamples(void)
|
int SNDDMA_AvailableCaptureSamples(void)
|
||||||
{
|
{
|
||||||
|
#if 0 // !!! FIXME: reenable after updating prebuild SDL libraries to 2.0.8!
|
||||||
// divided by 2 to convert from bytes to (mono16) samples.
|
// divided by 2 to convert from bytes to (mono16) samples.
|
||||||
return sdlCaptureDevice ? (SDL_GetQueuedAudioSize(sdlCaptureDevice) / 2) : 0;
|
return sdlCaptureDevice ? (SDL_GetQueuedAudioSize(sdlCaptureDevice) / 2) : 0;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNDDMA_Capture(int samples, byte *data)
|
void SNDDMA_Capture(int samples, byte *data)
|
||||||
{
|
{
|
||||||
|
#if 0 // !!! FIXME: reenable after updating prebuild SDL libraries to 2.0.8!
|
||||||
// multiplied by 2 to convert from (mono16) samples to bytes.
|
// multiplied by 2 to convert from (mono16) samples to bytes.
|
||||||
if (sdlCaptureDevice)
|
if (sdlCaptureDevice)
|
||||||
{
|
{
|
||||||
SDL_DequeueAudio(sdlCaptureDevice, data, samples * 2);
|
SDL_DequeueAudio(sdlCaptureDevice, data, samples * 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
SDL_memset(data, '\0', samples * 2);
|
SDL_memset(data, '\0', samples * 2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue