mirror of
https://github.com/encounter/SDL.git
synced 2025-06-06 06:33:41 +00:00
fix compilation error SDL_coreaudio mixing declarations and code
This commit is contained in:
parent
d0657fde30
commit
e41942e814
@ -1177,6 +1177,7 @@ COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture)
|
|||||||
char *devname;
|
char *devname;
|
||||||
int usable;
|
int usable;
|
||||||
double sampleRate;
|
double sampleRate;
|
||||||
|
CFIndex len;
|
||||||
|
|
||||||
AudioObjectPropertyAddress addr = {
|
AudioObjectPropertyAddress addr = {
|
||||||
iscapture ? kAudioHardwarePropertyDefaultInputDevice
|
iscapture ? kAudioHardwarePropertyDefaultInputDevice
|
||||||
@ -1222,7 +1223,7 @@ COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture)
|
|||||||
return SDL_SetError("%s: Default Device Name not found", "coreaudio");
|
return SDL_SetError("%s: Default Device Name not found", "coreaudio");
|
||||||
}
|
}
|
||||||
|
|
||||||
CFIndex len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr),
|
len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr),
|
||||||
kCFStringEncodingUTF8);
|
kCFStringEncodingUTF8);
|
||||||
devname = (char *) SDL_malloc(len + 1);
|
devname = (char *) SDL_malloc(len + 1);
|
||||||
usable = ((devname != NULL) &&
|
usable = ((devname != NULL) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user