mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
parent
936babf459
commit
3f447246c2
@ -33,9 +33,9 @@ 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
|
||||
<< ", format:" << hex << _audio_config.format << dec
|
||||
|
Loading…
Reference in New Issue
Block a user