Skip to content

Commit

Permalink
dummy audio: Patched to compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 3, 2016
1 parent 17246ba commit 20cd5e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/audio/dummy/SDL_dummyaudio.c
Expand Up @@ -22,6 +22,7 @@


/* Output audio to nowhere... */ /* Output audio to nowhere... */


#include "SDL_timer.h"
#include "SDL_audio.h" #include "SDL_audio.h"
#include "../SDL_audio_c.h" #include "../SDL_audio_c.h"
#include "SDL_dummyaudio.h" #include "SDL_dummyaudio.h"
Expand All @@ -36,7 +37,7 @@ static int
DUMMYAUD_CaptureFromDevice(_THIS, void *buffer, int buflen) DUMMYAUD_CaptureFromDevice(_THIS, void *buffer, int buflen)
{ {
/* Delay to make this sort of simulate real audio input. */ /* Delay to make this sort of simulate real audio input. */
SDL_Delay((device->spec.samples * 1000) / device->spec.freq); SDL_Delay((this->spec.samples * 1000) / this->spec.freq);


/* always return a full buffer of silence. */ /* always return a full buffer of silence. */
SDL_memset(buffer, this->spec.silence, buflen); SDL_memset(buffer, this->spec.silence, buflen);
Expand Down

0 comments on commit 20cd5e4

Please sign in to comment.