update audio frame stream for sdl changes
This commit is contained in:
parent
ef78c49e29
commit
edd949879b
@ -7,7 +7,7 @@ SDLAudioInputDeviceDefault::SDLAudioInputDeviceDefault(void) : _stream{nullptr,
|
|||||||
constexpr SDL_AudioSpec spec = { SDL_AUDIO_S16, 1, 48000 };
|
constexpr SDL_AudioSpec spec = { SDL_AUDIO_S16, 1, 48000 };
|
||||||
|
|
||||||
_stream = {
|
_stream = {
|
||||||
SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_CAPTURE, &spec, nullptr, nullptr),
|
SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_RECORDING, &spec, nullptr, nullptr),
|
||||||
&SDL_DestroyAudioStream
|
&SDL_DestroyAudioStream
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ SDLAudioOutputDeviceDefaultInstance SDLAudioOutputDeviceDefaultFactory::create(v
|
|||||||
constexpr SDL_AudioSpec spec = { SDL_AUDIO_S16, 1, 48000 };
|
constexpr SDL_AudioSpec spec = { SDL_AUDIO_S16, 1, 48000 };
|
||||||
|
|
||||||
new_instance._stream = {
|
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
|
&SDL_DestroyAudioStream
|
||||||
};
|
};
|
||||||
new_instance._last_sample_rate = spec.freq;
|
new_instance._last_sample_rate = spec.freq;
|
||||||
|
@ -40,7 +40,7 @@ struct SDLAudioOutputDeviceDefaultInstance : protected AudioFrameStream2I {
|
|||||||
|
|
||||||
uint32_t _last_sample_rate {48'000};
|
uint32_t _last_sample_rate {48'000};
|
||||||
size_t _last_channels {0};
|
size_t _last_channels {0};
|
||||||
SDL_AudioFormat _last_format {0};
|
SDL_AudioFormat _last_format {SDL_AUDIO_S16};
|
||||||
|
|
||||||
SDLAudioOutputDeviceDefaultInstance(void);
|
SDLAudioOutputDeviceDefaultInstance(void);
|
||||||
SDLAudioOutputDeviceDefaultInstance(SDLAudioOutputDeviceDefaultInstance&& other);
|
SDLAudioOutputDeviceDefaultInstance(SDLAudioOutputDeviceDefaultInstance&& other);
|
||||||
|
Loading…
Reference in New Issue
Block a user