more stream stuff, audio input device is unusable

This commit is contained in:
2024-09-25 11:25:22 +02:00
parent d0eeef2b94
commit 5eca1a99e0
5 changed files with 17 additions and 9 deletions

View File

@@ -162,10 +162,16 @@ MainScreen::MainScreen(SimpleConfigModel&& conf_, SDL_Renderer* renderer_, Theme
}
}
{ // audio in
if (false) { // audio in
ObjectHandle asrc {os.registry(), os.registry().create()};
try {
throw int(2);
asrc.emplace<Components::FrameStream2Source<AudioFrame>>(
std::make_unique<SDLAudioInputDeviceDefault>()
);
asrc.emplace<Components::StreamSource>(Components::StreamSource::create<AudioFrame>("SDL Audio Default Recording Device"));
os.throwEventConstruct(asrc);
} catch (...) {
os.registry().destroy(asrc);
}
@@ -178,7 +184,7 @@ MainScreen::MainScreen(SimpleConfigModel&& conf_, SDL_Renderer* renderer_, Theme
std::make_unique<SDLAudioOutputDeviceDefaultSink>()
);
asink.emplace<Components::StreamSink>(Components::StreamSink::create<AudioFrame>("LoudSpeaker"));
asink.emplace<Components::StreamSink>(Components::StreamSink::create<AudioFrame>("SDL Audio Default Playback Device"));
os.throwEventConstruct(asink);
} catch (...) {