Mercurial > sdl-ios-xcode
diff src/audio/paudio/SDL_paudio.c @ 2060:866052b01ee5
indent is evil
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 28 Oct 2006 16:48:03 +0000 |
parents | 5f6550e5184f |
children | e27bdcc80744 |
line wrap: on
line diff
--- a/src/audio/paudio/SDL_paudio.c Sat Oct 28 16:41:54 2006 +0000 +++ b/src/audio/paudio/SDL_paudio.c Sat Oct 28 16:48:03 2006 +0000 @@ -137,7 +137,9 @@ /* Use timer for general audio synchronization */ Sint32 ticks; - ticks = ((Sint32)(this->hidden->next_frame-SDL_GetTicks()))-FUDGE_TICKS; + ticks = + ((Sint32) (this->hidden->next_frame - SDL_GetTicks())) - + FUDGE_TICKS; if (ticks > 0) { SDL_Delay(ticks); } @@ -170,7 +172,8 @@ #ifdef DEBUG_AUDIO fprintf(stderr, "Waiting for audio to get ready\n"); #endif - if (select(this->hidden->audio_fd+1,NULL,&fdset,NULL,&timeout) <= 0) { + if (select(this->hidden->audio_fd + 1, NULL, &fdset, NULL, &timeout) + <= 0) { const char *message = "Audio timeout - buggy audio driver? (disabled)"; /* @@ -264,7 +267,7 @@ /* Initialize all variables that we clean on shutdown */ this->hidden = (struct SDL_PrivateAudioData *) - SDL_malloc((sizeof *this->hidden)); + SDL_malloc((sizeof *this->hidden)); if (this->hidden == NULL) { SDL_OutOfMemory(); return 0; @@ -515,7 +518,7 @@ /* Check to see if we need to use select() workaround */ if (workaround != NULL) { this->hidden->frame_ticks = (float) (this->spec.samples * 1000) / - this->spec.freq; + this->spec.freq; this->hidden->next_frame = SDL_GetTicks() + this->hidden->frame_ticks; } @@ -524,7 +527,7 @@ } static int -PAUDIO_Init(SDL_AudioDriverImpl *impl) +PAUDIO_Init(SDL_AudioDriverImpl * impl) { int fd = OpenAudioPath(NULL, 0, OPEN_FLAGS, 0); if (fd < 0) { @@ -539,7 +542,7 @@ impl->PlayDevice = DSP_WaitDevice; impl->GetDeviceBuf = DSP_GetDeviceBuf; impl->CloseDevice = DSP_CloseDevice; - impl->OnlyHasDefaultOutputDevice = 1; /* !!! FIXME: add device enum! */ + impl->OnlyHasDefaultOutputDevice = 1; /* !!! FIXME: add device enum! */ return 1; }