src/media/audio/drivers/virtual_audio/virtual_audio_stream.cc
// Drivers *must* report the time at which the first frame will be clocked out on the
// CLOCK_MONOTONIC timeline, not including any external delay.
Drivers *must* report the time at which the first frame will be clocked out on the
CLOCK_MONOTONIC timeline, not including any external delay.
Drivers * must * report the time at which the first frame will be clocked out on the CLOCK_MONOTONIC timeline not including any external delay .
zx_status_t VirtualAudioStream::Start(uint64_t* out_start_time) {
  start_time_ =
      zx::clock::get_monotonic() + zx::duration((zx::sec(1) * fifo_depth_) / bytes_per_sec_);
  if (notification_period_.get() > 0) {
    notify_timer_.PostForTime(dispatcher(), start_time_);
    target_notification_time_ = start_time_;
  }
  if (using_alt_notifications_ && alt_notification_period_.get() > 0) {
    alt_notify_timer_.PostForTime(dispatcher(), start_time_);
    target_alt_notification_time_ = start_time_;
  }
  parent_->NotifyStart(start_time_.get());
  *out_start_time = start_time_.get();
  return ZX_OK;
}
zx_status_t VirtualAudioStream :: Start ( uint64_t * out_start_time ) { start_time_ = zx :: clock :: get_monotonic ( ) + zx :: duration ( ( zx :: sec ( 1 ) * fifo_depth_ ) / bytes_per_sec_ ) ; if ( notification_period_ . get ( ) > 0 ) { notify_timer_ . PostForTime ( dispatcher ( ) , start_time_ ) ; target_notification_time_ = start_time_ ; } if ( using_alt_notifications_ && alt_notification_period_ . get ( ) > 0 ) { alt_notify_timer_ . PostForTime ( dispatcher ( ) , start_time_ ) ; target_alt_notification_time_ = start_time_ ; } parent_ -> NotifyStart ( start_time_ . get ( ) ) ; * out_start_time = start_time_ . get ( ) ; return ZX_OK ; }
Drivers *must* report the time at which the first frame will be clocked out on the
CLOCK_MONOTONIC timeline, not including any external delay.
Drivers * must * report the time at which the first frame will be clocked out on the CLOCK_MONOTONIC timeline not including any external delay .
// Incorporate delay caused by fifo_depth_ // Set the timer here (if notifications are enabled).