diff --git a/src/content/sdl_audio_frame_stream2.cpp b/src/content/sdl_audio_frame_stream2.cpp index f497453..26a21cf 100644 --- a/src/content/sdl_audio_frame_stream2.cpp +++ b/src/content/sdl_audio_frame_stream2.cpp @@ -7,7 +7,7 @@ SDLAudioInputDeviceDefault::SDLAudioInputDeviceDefault(void) : _stream{nullptr, constexpr SDL_AudioSpec spec = { SDL_AUDIO_S16, 1, 48000 }; _stream = { - SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_CAPTURE, &spec, nullptr, nullptr), + SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_RECORDING, &spec, nullptr, nullptr), &SDL_DestroyAudioStream }; @@ -151,7 +151,7 @@ SDLAudioOutputDeviceDefaultInstance SDLAudioOutputDeviceDefaultFactory::create(v constexpr SDL_AudioSpec spec = { SDL_AUDIO_S16, 1, 48000 }; new_instance._stream = { - SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_OUTPUT, &spec, nullptr, nullptr), + SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &spec, nullptr, nullptr), &SDL_DestroyAudioStream }; new_instance._last_sample_rate = spec.freq; diff --git a/src/content/sdl_audio_frame_stream2.hpp b/src/content/sdl_audio_frame_stream2.hpp index 11761b9..08ae4d0 100644 --- a/src/content/sdl_audio_frame_stream2.hpp +++ b/src/content/sdl_audio_frame_stream2.hpp @@ -40,7 +40,7 @@ struct SDLAudioOutputDeviceDefaultInstance : protected AudioFrameStream2I { uint32_t _last_sample_rate {48'000}; size_t _last_channels {0}; - SDL_AudioFormat _last_format {0}; + SDL_AudioFormat _last_format {SDL_AUDIO_S16}; SDLAudioOutputDeviceDefaultInstance(void); SDLAudioOutputDeviceDefaultInstance(SDLAudioOutputDeviceDefaultInstance&& other);