赞
踩
函数原型:
SDL_AudioDeviceIDSDL_OpenAudioDevice(const char *device, int iscapture,
const SDL_AudioSpec * desired, SDL_AudioSpec * obtained,
int allowed_changes)
{
return open_audio_device(device, iscapture, desired, obtained, allowed_changes, 2);
}
static SDL_AudioDeviceIDopen_audio_device(const char *devname, int iscapture,
const SDL_AudioSpec * desired, SDL_AudioSpec * obtained,
int allowed_changes, int min_id);
SDL_OpenAudioDevice和SDL_OpenAudio函数都是通过调用open_audio_device来实现打开Audio device的操作的,
所以SDL2为了与SDL1.x兼容,SDL_OpenAudioDevice函数只能用来打开AudioDeviceID大于等于2的设备,
而默认的设备,即AudioDeviceID等于1,只能用SDL_OpenAudio函数打开。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。