rewrite audio input, always open? but thin stream wrapper

This commit is contained in:
2024-09-25 14:36:51 +02:00
parent 5eca1a99e0
commit 5b3e0e2a0b
6 changed files with 190 additions and 119 deletions

View File

@ -79,8 +79,8 @@ int main(int argc, char** argv) {
if (!SDL_Init(SDL_INIT_AUDIO)) {
std::cerr << "SDL_Init AUDIO failed (" << SDL_GetError() << ")\n";
} else if (false) {
SDLAudioInputDeviceDefault aidd;
auto reader = aidd.subscribe();
SDLAudioInputDevice aid;
auto reader = aid.subscribe();
auto writer = SDLAudioOutputDeviceDefaultSink{}.subscribe();
@ -95,7 +95,7 @@ int main(int argc, char** argv) {
}
}
aidd.unsubscribe(reader);
aid.unsubscribe(reader);
}
if (!SDL_Init(SDL_INIT_CAMERA)) {