X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=alsa_pool.cpp;h=3092dc32335551deed1b2b7b2255c07b7e9a19db;hb=a5746714e6ca1e665bf9e74344e67712443f947a;hp=1c9c4d389a46fc5246a4693439fd9f09b77bfdfb;hpb=f185dd186b7a9747331192ac55cb1f81e282cb0f;p=nageru diff --git a/alsa_pool.cpp b/alsa_pool.cpp index 1c9c4d3..3092dc3 100644 --- a/alsa_pool.cpp +++ b/alsa_pool.cpp @@ -199,7 +199,7 @@ ALSAPool::ProbeResult ALSAPool::probe_device_once(unsigned card_index, unsigned } if (err < 0) { // Not available for capture. - printf("%s: Not available for capture. %d\n", address, err); + printf("%s: Not available for capture.\n", address); return ALSAPool::ProbeResult::DEFER; } @@ -391,6 +391,10 @@ void ALSAPool::reset_device(unsigned index) { lock_guard lock(mu); Device *device = &devices[index]; + if (device->state == Device::State::DEAD) { + // Not running, and should not be started. + return; + } if (inputs[index] != nullptr) { inputs[index]->stop_capture_thread(); }