New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 669916 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Non bitexact behavior between when the capture audio input is stored in audio_input_controller.cc to where it is received by the WebRTC audio processing module

Project Member Reported by peah@chromium.org, Nov 30 2016

Issue description

In a MacBook Pro recording it was found that the capture audio input wav file stored in audio_input_controller.cc differed from the wav audio data stored in the audio processing module.

This is not expected as there should be no audio processing applied to the audio signal in between.

The difference was very small which means that it is not a problem for the audio quality. This is, however, an indication that unnecessary processing is applied to the audio.

The sample rate was 44.1 kHz

 
Status: Assigned (was: Available)
I assume that's the sample rate of the AEC recording? Do we know the system sample rate for that stream/call?

Comment 2 by peah@chromium.org, Nov 30 2016

The sample rates were the same. I.e. the sample rate in the wav file stored in audio_input_controller.cc was the same as in the audio processing module. Furthermore, both were stored as 32 bit float.

Thanks! I failed to mention that. 
Cc: solenberg@chromium.org
Can you attach the differing files? Is it an LSB diff, time shift or something else?

Comment 4 by peah@chromium.org, Dec 1 2016

I can send them to you offline. The diff I did was in matlab as:
a = audioread('file1.wav');
b = audioread('file1.wav');
norm(a-b)
plot([a-b a])

No time-shift was required, the files are of the same lengths it is quite clear that there is no shift between them (I tested by introducing an artificial shift of 1 sample which caused the norm to be much larger).

Comment 5 by peah@chromium.org, Dec 1 2016

I took a further look and the bitinexactness is really supersmall

The samples are 32 bit floats and the error is 2^-30. Maybe it is not worth looking into, and maybe it is caused by the recording/reading of the float pcm data.

But if it is expected to be bitexact, my concern is that this is caused by some processing code which is not needed (and does almost nothing) for this sample rate. One such could be a resampler that does resampling with the input frequency equal to the output frequency.

I would suspect float<->int conversions. Chrome passes around audio as floats in AudioBus objects, but it is converted to 16 bits before being pushed to WebRTCs AudioTransport::OnData(), then obviously converted to floats again. Since the error is so small, that indicates Chrome gets its data in 16 bit format from the sound card originally.

Yes, WebRTC should take floats instead.

Comment 7 by peah@chromium.org, Dec 1 2016

That makes sense. Should have known that :-). 

Yes, WebRTC should take floats instead. 

From that, this difference is actually expected.

Then I think this can be closed.

Comment 8 by peah@chromium.org, Dec 6 2016

Status: WontFix (was: Assigned)

Sign in to add a comment