RETURN_ON_ERROR("snd_pcm_start()", snd_pcm_start(pcm_handle));
parent_pool->set_card_state(internal_dev_index, ALSAPool::Device::State::RUNNING);
- uint64_t num_frames_output = 0;
while (!should_quit.should_quit()) {
int ret = snd_pcm_wait(pcm_handle, /*timeout=*/100);
if (ret == 0) continue; // Timeout.
if (should_quit.should_quit()) return CaptureEndReason::REQUESTED_QUIT;
success = audio_callback(buffer.get(), frames, audio_format, now);
} while (!success);
- num_frames_output += frames;
}
return CaptureEndReason::REQUESTED_QUIT;
}