mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
parent
936babf459
commit
3f447246c2
@ -33,8 +33,8 @@ SDLAudioDevice::SDLAudioDevice() {
|
||||
SDLAudioDevice *_this = (SDLAudioDevice *) userdata;
|
||||
_this->onReqPCM((char *) stream, len);
|
||||
};
|
||||
if (SDL_OpenAudio(&wanted_spec, &_audio_config) < 0) {
|
||||
throw std::runtime_error("SDL_OpenAudio failed");
|
||||
if (SDL_OpenAudioDevice(NULL, 0, &wanted_spec, &_audio_config, SDL_AUDIO_ALLOW_ANY_CHANGE) < 0) {
|
||||
throw std::runtime_error("SDL_OpenAudioDevice failed");
|
||||
}
|
||||
|
||||
InfoL << "actual audioSpec, " << "freq:" << _audio_config.freq
|
||||
|
Loading…
Reference in New Issue
Block a user