Relay Audio track audio (Add remote track to peerconnection) using native webrtc C++ libs

948 views
Skip to first unread message

Faraz Khan

unread,
Jan 8, 2015, 2:36:32 PM1/8/15
to discuss...@googlegroups.com
I'm looking to modify / find out if its possible to 'extract / inject' raw opus/pcm data from a audio track in native C++ land somehow and feed it back as the source of a audio track. I'm aware of the effort thats ongoing in chrome and at tracking it at:


I was wondering if someone can help me with where to start if I wanted to do this possibly myself right now (I'm comfortable diving into the audio processing module!). I'm looking to ideally figuring out a file / area in the code where I can get access to opus and/or decoded PCM of the remote audio track (and then the corresponding place where I can re-inject this PCM/Opus back into the local audio track).

I understand that this may be duplicated effort on my part (it'll probably become totally useless when you guys add native relaying) but I kinda have to get this to work in some way soon and am vert interested in understanding the guts on the audio subsystem. 

Thanks! 

Kaiduan Xie

unread,
Jan 8, 2015, 2:47:34 PM1/8/15
to discuss...@googlegroups.com
The audio capture/playback is different in Chrome browser and native application.

In native application, audio device in webrtc media stack takes care of audio capture and playback, the audio device is constructed in the following module.


This is a good start point to explore how audio capture/playback fits in the whole audio pipe.

/Kaiduan

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

devel...@gmail.com

unread,
Jul 12, 2016, 3:49:37 AM7/12/16
to discuss-webrtc
Now I see that the issue 'Implement adding remote audio track/stream to a PeerConnection' is fixed. But how to actually use it? Suppose, I've got a PCM data in memory, what API should be used to send that?

Alexey Kolikov

unread,
Oct 6, 2017, 7:08:45 AM10/6/17
to discuss-webrtc
Hi, did you find how to put PCM data from buffer to PeerConnection's audio track?

Silvia Pfeiffer

unread,
Oct 7, 2017, 3:12:39 PM10/7/17
to discuss...@googlegroups.com
Here's a demo using WebAudio - maybe read the browser sourc cyder to see how this is done? https://webrtc.github.io/samples/src/content/peerconnection/webaudio-input/

Best Regards,
Silvia.

To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/694955e9-b858-41e8-b14b-820677bd48c4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages