src/media/audio/audio_core/audio_device_manager.cc
// We are no longer managing audio devices, unwind everything.
We are no longer managing audio devices, unwind everything.
We are no longer managing audio devices unwind everything .
void AudioDeviceManager::Shutdown() {
  TRACE_DURATION("audio", "AudioDeviceManager::Shutdown");
  plug_detector_->Stop();
  std::vector<fit::promise<void>> device_promises;
  for (auto& [_, device] : devices_pending_init_) {
    device_promises.push_back(device->Shutdown());
  }
  devices_pending_init_.clear();
  for (auto& [_, device] : devices_) {
    device_promises.push_back(device->Shutdown());
  }
  devices_.clear();
  fit::run_single_threaded(fit::join_promise_vector(std::move(device_promises)));
}
void AudioDeviceManager :: Shutdown ( ) { TRACE_DURATION ( " " , " " ) ; plug_detector_ -> Stop ( ) ; std :: vector < fit :: promise < void > > device_promises ; for ( auto & [ _ , device ] : devices_pending_init_ ) { device_promises . push_back ( device -> Shutdown ( ) ) ; } devices_pending_init_ . clear ( ) ; for ( auto & [ _ , device ] : devices_ ) { device_promises . push_back ( device -> Shutdown ( ) ) ; } devices_ . clear ( ) ; fit :: run_single_threaded ( fit :: join_promise_vector ( std :: move ( device_promises ) ) ) ; }
We are no longer managing audio devices, unwind everything.
We are no longer managing audio devices unwind everything .