Fake Audio Loopback

1,429 views
Skip to first unread message

Rishabh Gupta

unread,
Jul 22, 2015, 10:01:26 AM7/22/15
to Chromium-dev

Below switches can be used to switch to desired audio /video file  [wav/ y4m].


--use-fake-ui-for-media-stream

 --use-fake-device-for-media-stream

  --use-file-for-fake-audio-capture

--use-file-for-fake-video-capture


When I play an audio file which is passes in fake switch above , it just plays once, is there anyway to play it in loop [loopback].  So that it keeps playing indefinitely until MIC is switched off ?


What code changes are required to do it ?   is there any existing chromium switch to achieve it ?


Similarly what changes are required for video loopback ?

Patrik Höglund

unread,
Sep 2, 2015, 4:24:30 AM9/2/15
to rishabh...@gmail.com, Chromium-dev
Hi!

I'm the guy who implemented --use-file-for-fake-audio-capture. Sorry, I didn't see your question until now.

I intentionally implemented the file source to not loop, because it made my WebRTC auto-gain control tests a bit easier to implement. You can work around this problem by simply providing a very long audio file (well, up to a certain point).

This line of code instructs the player to stop after it reaches the end of the file. You could probably just set the read pos to zero there instead to make it loop. It will probably break the auto gain control tests, but it might be possible to solve that by just padding silence into the input files. You see, the problem is that the whole file needs to play out exactly once while accounting for variance in call-setup time, otherwise we will be unable to sync the input and output and compute a correct difference in gain.

Let me know if you make a patch and manage to make it loop. If so, I can review and take a look at making the AGC tests work.

As for video, it already loops, no?

/ P

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Reply all
Reply to author
Forward
0 new messages