当连接建立并准备就绪时,我的webrtc::PeerConnectionObserver
实现会收到一个调用
void OnAddStream(webrtc::MediaStreamInterface* stream);
我从哪里拉webrtc::AudioTrackInterface
出来的webrtc::MediaStreamInterface
。
我从这里得到一个有效的(非空)指针,调用它track
webrtc::AudioTrackInterface* track;
然后我继续调用track->AddSink(sink)
,sink
我继承webrtc::AudioTrackSinkInterface
并实现的类的实例在哪里
virtual void OnData(const void* audio_data,
int bits_per_sample,
int sample_rate,
int number_of_channels,
int number_of_frames) = 0;
在这一点上,我希望通过解码的音频数据接收到我的具体类的常规回调,就像我在视频数据可用时接收到我webrtc::VideoRendererInterface
的调用一样cricket::VideoFrame*
,但我没有。
我究竟做错了什么?