mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1408294 - Append null audio data when audio input underruns. r=padenot
MozReview-Commit-ID: KEP3J41BEmJ --HG-- extra : rebase_source : f8b5fb4e331e29f28e1d421b145201e811e20f7b
This commit is contained in:
parent
c16103af60
commit
87f1066788
@ -553,8 +553,19 @@ MediaEngineWebRTCMicrophoneSource::NotifyPull(MediaStreamGraph *aGraph,
|
||||
StreamTime aDesiredTime,
|
||||
const PrincipalHandle& aPrincipalHandle)
|
||||
{
|
||||
// Ignore - we push audio data
|
||||
LOG_FRAMES(("NotifyPull, desired = %" PRId64, (int64_t) aDesiredTime));
|
||||
|
||||
StreamTime delta = aDesiredTime - aSource->GetEndOfAppendedData(aID);
|
||||
if (delta <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Not enough data has been pushed so we fill it with silence.
|
||||
// This could be due to underruns or because we have been stopped.
|
||||
|
||||
AudioSegment audio;
|
||||
audio.AppendNullData(delta);
|
||||
aSource->AppendToTrack(aID, &audio);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -40,6 +40,7 @@ if CONFIG['MOZ_WEBRTC']:
|
||||
LOCAL_INCLUDES += [
|
||||
'..',
|
||||
'/dom/base',
|
||||
'/dom/media',
|
||||
'/media/libyuv/libyuv/include',
|
||||
'/media/webrtc/signaling/src/common',
|
||||
'/media/webrtc/signaling/src/common/browser_logging',
|
||||
|
Loading…
Reference in New Issue
Block a user