Class HearingAidAudioReceiver

Synopsis

#include <bta/include/bta_hearing_aid_api.h>

class HearingAidAudioReceiver

Description

Implementations of HearingAid will also implement this interface

Methods

~HearingAidAudioReceiver
OnAudioDataReady
OnAudioResume
OnAudioSuspend

Source

Lines 37-57 in bta/include/bta_hearing_aid_api.h.

class HearingAidAudioReceiver {
 public:
  virtual ~HearingAidAudioReceiver() = default;
  virtual void OnAudioDataReady(const std::vector<uint8_t>& data) = 0;

  // API to stop our feeding timer, and notify hearing aid devices that the
  // streaming would stop, too.
  //
  // @param stop_audio_ticks a callable function calls out to stop the media
  // timer for reading data.
  virtual void OnAudioSuspend(
      const std::function<void()>& stop_audio_ticks) = 0;

  // To notify hearing aid devices to be ready for streaming, and start the
  // media timer to feed the audio data.
  //
  // @param start_audio_ticks a callable function calls out to start a periodic
  // timer for feeding data from the audio HAL.
  virtual void OnAudioResume(
      const std::function<void()>& start_audio_ticks) = 0;
};





Add Discussion as Guest

Log in to DocsForge