Mercurial > sdl-ios-xcode
comparison src/audio/SDL_audio.c @ 3840:be9bd1067c6c SDL-ryan-multiple-audio-device
Some fixes that were discovered when trying to get OS/2 audio working again...
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 08 Oct 2006 08:58:36 +0000 |
parents | 7c9663fb0860 |
children | ce229f6b5ce0 |
comparison
equal
deleted
inserted
replaced
3839:506fc6ca82cb | 3840:be9bd1067c6c |
---|---|
612 devname = NULL; | 612 devname = NULL; |
613 | 613 |
614 for (i = 0; i < SDL_arraysize(open_devices); i++) { | 614 for (i = 0; i < SDL_arraysize(open_devices); i++) { |
615 if ((open_devices[i]) && (open_devices[i]->iscapture)) { | 615 if ((open_devices[i]) && (open_devices[i]->iscapture)) { |
616 SDL_SetError("Audio device already open"); | 616 SDL_SetError("Audio device already open"); |
617 return; | 617 return 0; |
618 } | 618 } |
619 } | 619 } |
620 } | 620 } |
621 | 621 |
622 if ((!iscapture) && (current_audio.impl.OnlyHasDefaultOutputDevice)) { | 622 if ((!iscapture) && (current_audio.impl.OnlyHasDefaultOutputDevice)) { |
627 devname = NULL; | 627 devname = NULL; |
628 | 628 |
629 for (i = 0; i < SDL_arraysize(open_devices); i++) { | 629 for (i = 0; i < SDL_arraysize(open_devices); i++) { |
630 if ((open_devices[i]) && (!open_devices[i]->iscapture)) { | 630 if ((open_devices[i]) && (!open_devices[i]->iscapture)) { |
631 SDL_SetError("Audio device already open"); | 631 SDL_SetError("Audio device already open"); |
632 return; | 632 return 0; |
633 } | 633 } |
634 } | 634 } |
635 } | 635 } |
636 | 636 |
637 device = (SDL_AudioDevice *) SDL_AllocAudioMem(sizeof (SDL_AudioDevice)); | 637 device = (SDL_AudioDevice *) SDL_AllocAudioMem(sizeof (SDL_AudioDevice)); |