ZegoLiveRoom
zego-api-audio-observer.h
Go to the documentation of this file.
1//
2// zego-api-audio-observer.h
3//
4
5#ifndef zego_api_audio_observer_h
6#define zego_api_audio_observer_h
7#include "zego-api-defines.h"
8
9namespace ZEGO
10{
11 namespace AUDIO_OBSERVER
12 {
13
14 /* * 音频源类型 */
16 {
27 };
28
33 {
34 public:
47 virtual void OnCapturedAudioData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth) {}
48
61 virtual void OnPlaybackAudioData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth) {}
62
75 virtual void OnMixAudioData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth) {}
76
89 virtual void OnSysplayAndMicData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth) {}
90
103 virtual void OnSysplayNoStreamData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth) {}
104
105
110 virtual void OnAudioObserverError(int errorCode) = 0;
111
113 };
114
124
141 ZEGOAVKIT_API bool StartAudioObserver(int source, int sampleRate = 44100, int numOfChannels = 1);
142
149
150 }
151}
152
153#endif /* zego_api_audio_observer_h */
Definition: zego-api-audio-observer.h:33
virtual void OnSysplayNoStreamData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth)
Definition: zego-api-audio-observer.h:103
virtual void OnPlaybackAudioData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth)
Definition: zego-api-audio-observer.h:61
virtual ~IZegoAudioObserverCallback()
Definition: zego-api-audio-observer.h:112
virtual void OnSysplayAndMicData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth)
Definition: zego-api-audio-observer.h:89
virtual void OnCapturedAudioData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth)
Definition: zego-api-audio-observer.h:47
virtual void OnMixAudioData(const unsigned char *data, int dataLen, int sampleRate, int numChannels, int bitDepth)
Definition: zego-api-audio-observer.h:75
virtual void OnAudioObserverError(int errorCode)=0
ZEGOAVKIT_API bool SetAudioObserverCallback(IZegoAudioObserverCallback *cb)
ZEGOAVKIT_API bool StartAudioObserver(int source, int sampleRate=44100, int numOfChannels=1)
ZEGOAVKIT_API void StopAudioObserver()
ZegoAudioObserverSource
Definition: zego-api-audio-observer.h:16
@ ZEGOAPI_AUDIO_OBSERVER_PLAYBACK
Definition: zego-api-audio-observer.h:20
@ ZEGOAPI_AUDIO_OBSERVER_CAPTURE
Definition: zego-api-audio-observer.h:18
@ ZEGOAPI_AUDIO_OBSERVER_MIX
Definition: zego-api-audio-observer.h:22
@ ZEGOAPI_AUDIO_OBSERVER_SYSPLAY_NO_STREAM
Definition: zego-api-audio-observer.h:26
@ ZEGOAPI_AUDIO_OBSERVER_SYSPLAY_AND_MIC
Definition: zego-api-audio-observer.h:24
Definition: AVDefines.h:17
#define ZEGOAVKIT_API
Definition: zego-api-defines.h:59