• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2016 The WebRTC Project Authors. All rights reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_
12 #define SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_
13 
14 #include "rtc_base/thread.h"
15 
16 namespace webrtc {
17 
18 // Observer interface for listening to AVAudioSession events.
19 class AudioSessionObserver {
20  public:
21   // Called when audio session interruption begins.
22   virtual void OnInterruptionBegin() = 0;
23 
24   // Called when audio session interruption ends.
25   virtual void OnInterruptionEnd() = 0;
26 
27   // Called when audio route changes.
28   virtual void OnValidRouteChange() = 0;
29 
30   // Called when the ability to play or record changes.
31   virtual void OnCanPlayOrRecordChange(bool can_play_or_record) = 0;
32 
33   virtual void OnChangedOutputVolume() = 0;
34 
35  protected:
~AudioSessionObserver()36   virtual ~AudioSessionObserver() {}
37 };
38 
39 }  // namespace webrtc
40 
41 #endif  //  SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_
42