When the connection is set up and ready my webrtc::PeerConnectionObserver
implementation receives a call to
void OnAddStream(webrtc::MediaStreamInterface* stream);
where I pull the webrtc::AudioTrackInterface
out of the webrtc::MediaStreamInterface
.
I get a valid (non-null) pointer back from this, call it track
webrtc::AudioTrackInterface* track;
and I proceed to call track->AddSink(sink)
, where sink
is my instance of a class that inherits from webrtc::AudioTrackSinkInterface
and implements
virtual void OnData(const void* audio_data,
int bits_per_sample,
int sample_rate,
int number_of_channels,
int number_of_frames) = 0;
At this point I expect to recieve regular callbacks into my concrete class with the decoded audio data, just like I receive calls into my webrtc::VideoRendererInterface
with a cricket::VideoFrame*
when video data is available, but I do not.
What am I doing wrong?