History log of /external/webrtc/webrtc/common_audio/wav_file.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6955870806624479723addfae6dcf5d13968796c 13-Jan-2016 Peter Kasting <pkasting@google.com> Convert channel counts to size_t.

IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/1316523002 .

Cr-Commit-Position: refs/heads/master@{#11229}
/external/webrtc/webrtc/common_audio/wav_file.cc
25702cb1628941427fa55e528f53483f239ae011 08-Jan-2016 pkasting <pkasting@chromium.org> Misc. small cleanups.

* Better param names
* Avoid using negative values for (bogus) placeholder channel counts (mostly in tests). Since channels will be changing to size_t, negative values will be illegal; it's sufficient to use 0 in these cases.
* Use arraysize()
* Use size_t for counting frames, samples, blocks, buffers, and bytes -- most of these are already size_t in most places, this just fixes some stragglers
* reinterpret_cast<int64_t>(void*) is not necessarily safe; use uintptr_t instead
* Remove unnecessary code, e.g. dead code, needlessly long/repetitive code, or function overrides that exactly match the base definition
* Fix indenting
* Use uint32_t for timestamps (matching how it's already a uint32_t in most places)
* Spelling
* RTC_CHECK_EQ(expected, actual)
* Rewrap
* Use .empty()
* Be more pedantic about matching int/int32_t/
* Remove pointless consts on input parameters to functions
* Add missing sanity checks

All this was found in the course of constructing https://codereview.webrtc.org/1316523002/ , and is being landed separately first.

BUG=none
TEST=none

Review URL: https://codereview.webrtc.org/1534193008

Cr-Commit-Position: refs/heads/master@{#11191}
/external/webrtc/webrtc/common_audio/wav_file.cc
b0ad43baa02f41dba01be4df9606dc65f24c0ec8 20-Nov-2015 aluebs <aluebs@webrtc.org> Add aecdump support to audioproc_f

Originally landed here: https://codereview.webrtc.org/1409943002/
The transient suppression fix landed here: https://codereview.webrtc.org/1411423010/

TBR=mflodman

Review URL: https://codereview.webrtc.org/1432843002

Cr-Commit-Position: refs/heads/master@{#10722}
/external/webrtc/webrtc/common_audio/wav_file.cc
b7a5c16d2c6dbe5ca17fca86a3180b8aad5054f7 05-Nov-2015 kjellander <kjellander@webrtc.org> Revert of Add aecdump support to audioproc_f. (patchset #8 id:200001 of https://codereview.webrtc.org/1409943002/ )

This is the second revert. The first attempt in https://codereview.webrtc.org/1423693008/
was missing a subtle curly brace caused by a merge conflict.
I'm going to let this one go through the CQ.

Reason for revert:
This breaks iOS GYP generation as described on http://www.webrtc.org/native-code/ios
I'm going to drive getting the build_with_libjingle=1 setting removed from the bots to match the official instructions.

See https://code.google.com/p/webrtc/issues/detail?id=4653 for more context, as this is exactly what that issue tries to solve.

Original issue's description:
> Add aecdump support to audioproc_f.
>
> Add a new interface to abstract away file operations. This CL temporarily
> removes support for dumping the output of reverse streams. It will be easy to
> restore in the new framework, although we may decide to only allow it with
> the aecdump format.
>
> We also now require the user to specify the output format, rather than
> defaulting to the input format.
>
> TEST=Bit-exact output to the previous audioproc_f version using an input wav
> file, and to the legacy audioproc using an aecdump file.
>
> Committed: https://crrev.com/bdafe31b86e9819b0adb9041f87e6194b7422b08
> Cr-Commit-Position: refs/heads/master@{#10460}

TBR=aluebs@webrtc.org,peah@webrtc.org,andrew@webrtc.org
BUG=

Review URL: https://codereview.webrtc.org/1412963007

Cr-Commit-Position: refs/heads/master@{#10532}
/external/webrtc/webrtc/common_audio/wav_file.cc
86b40506b3443d5cf0c5ec838e44edd9f4376c01 05-Nov-2015 kjellander <kjellander@webrtc.org> Reland of Add aecdump support to audioproc_f. (patchset #2 id:250001 of https://codereview.webrtc.org/1423693008/ )

Reason for revert:
Oh dear, this broke compilation.
I guess more was built on top of this CL before I reverted it.

Reverting now for futher investigation (and re-land using CQ)

Original issue's description:
> Revert of Add aecdump support to audioproc_f. (patchset #8 id:200001 of https://codereview.webrtc.org/1409943002/ )
>
> Reason for revert:
> This breaks iOS GYP generation as described on http://www.webrtc.org/native-code/ios
> I'm going to drive getting the build_with_libjingle=1 setting removed from the bots to match the official instructions.
>
> See https://code.google.com/p/webrtc/issues/detail?id=4653 for more context, as this is exactly what that issue tries to solve.
>
> Original issue's description:
> > Add aecdump support to audioproc_f.
> >
> > Add a new interface to abstract away file operations. This CL temporarily
> > removes support for dumping the output of reverse streams. It will be easy to
> > restore in the new framework, although we may decide to only allow it with
> > the aecdump format.
> >
> > We also now require the user to specify the output format, rather than
> > defaulting to the input format.
> >
> > TEST=Bit-exact output to the previous audioproc_f version using an input wav
> > file, and to the legacy audioproc using an aecdump file.
> >
> > Committed: https://crrev.com/bdafe31b86e9819b0adb9041f87e6194b7422b08
> > Cr-Commit-Position: refs/heads/master@{#10460}
>
> TBR=aluebs@webrtc.org,peah@webrtc.org,andrew@webrtc.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/d279941bb54bfdc6e7324bf36cac76581474b96d
> Cr-Commit-Position: refs/heads/master@{#10523}

TBR=aluebs@webrtc.org,peah@webrtc.org,andrew@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.webrtc.org/1419953010

Cr-Commit-Position: refs/heads/master@{#10524}
/external/webrtc/webrtc/common_audio/wav_file.cc
d279941bb54bfdc6e7324bf36cac76581474b96d 05-Nov-2015 kjellander <kjellander@webrtc.org> Revert of Add aecdump support to audioproc_f. (patchset #8 id:200001 of https://codereview.webrtc.org/1409943002/ )

Reason for revert:
This breaks iOS GYP generation as described on http://www.webrtc.org/native-code/ios
I'm going to drive getting the build_with_libjingle=1 setting removed from the bots to match the official instructions.

See https://code.google.com/p/webrtc/issues/detail?id=4653 for more context, as this is exactly what that issue tries to solve.

Original issue's description:
> Add aecdump support to audioproc_f.
>
> Add a new interface to abstract away file operations. This CL temporarily
> removes support for dumping the output of reverse streams. It will be easy to
> restore in the new framework, although we may decide to only allow it with
> the aecdump format.
>
> We also now require the user to specify the output format, rather than
> defaulting to the input format.
>
> TEST=Bit-exact output to the previous audioproc_f version using an input wav
> file, and to the legacy audioproc using an aecdump file.
>
> Committed: https://crrev.com/bdafe31b86e9819b0adb9041f87e6194b7422b08
> Cr-Commit-Position: refs/heads/master@{#10460}

TBR=aluebs@webrtc.org,peah@webrtc.org,andrew@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.webrtc.org/1423693008

Cr-Commit-Position: refs/heads/master@{#10523}
/external/webrtc/webrtc/common_audio/wav_file.cc
bdafe31b86e9819b0adb9041f87e6194b7422b08 30-Oct-2015 andrew <andrew@webrtc.org> Add aecdump support to audioproc_f.

Add a new interface to abstract away file operations. This CL temporarily
removes support for dumping the output of reverse streams. It will be easy to
restore in the new framework, although we may decide to only allow it with
the aecdump format.

We also now require the user to specify the output format, rather than
defaulting to the input format.

TEST=Bit-exact output to the previous audioproc_f version using an input wav
file, and to the legacy audioproc using an aecdump file.

Review URL: https://codereview.webrtc.org/1409943002

Cr-Commit-Position: refs/heads/master@{#10460}
/external/webrtc/webrtc/common_audio/wav_file.cc
91d6edef35e7275879c30ce16ecb8b6dc73c6e4a 17-Sep-2015 henrikg <henrikg@webrtc.org> Add RTC_ prefix to (D)CHECKs and related macros.

We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.

Alternative solutions:
* Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable.
* Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce.
* Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable.
* Changes in Chromium for this is obviously not an option.

BUG=chromium:468375
NOTRY=true

Review URL: https://codereview.webrtc.org/1335923002

Cr-Commit-Position: refs/heads/master@{#9964}
/external/webrtc/webrtc/common_audio/wav_file.cc
86c6d33aec684d08189d498912e47cbc17c4d2db 23-Jul-2015 Michael Graczyk <mgraczyk@chromium.org> Allow more than 2 input channels in AudioProcessing.

The number of output channels is constrained to be equal to either 1 or the
number of input channels.

An earlier version of this commit caused a crash on AEC dump.

TBR=aluebs@webrtc.org,pbos@webrtc.org

Review URL: https://codereview.webrtc.org/1248393003 .

Cr-Commit-Position: refs/heads/master@{#9626}
/external/webrtc/webrtc/common_audio/wav_file.cc
64e753c3998a17429418180b3a947231a9fd98cd 23-Jul-2015 magjed <magjed@webrtc.org> Revert of Allow more than 2 input channels in AudioProcessing. (patchset #13 id:240001 of https://codereview.webrtc.org/1226093007/)

Reason for revert:
Breaks Chromium FYI content_browsertest on all platforms. The testcase that fails is WebRtcAecDumpBrowserTest.CallWithAecDump.

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux/builds/19388

Sample output:
[ RUN ] WebRtcAecDumpBrowserTest.CallWithAecDump
Xlib: extension "RANDR" missing on display ":9".
[4:14:0722/211548:1282124453:WARNING:webrtcvoiceengine.cc(472)] Unexpected codec: ISAC/48000/1 (105)
[4:14:0722/211548:1282124593:WARNING:webrtcvoiceengine.cc(472)] Unexpected codec: PCMU/8000/2 (110)
[4:14:0722/211548:1282124700:WARNING:webrtcvoiceengine.cc(472)] Unexpected codec: PCMA/8000/2 (118)
[4:14:0722/211548:1282124815:WARNING:webrtcvoiceengine.cc(472)] Unexpected codec: G722/8000/2 (119)
[19745:19745:0722/211548:1282133667:INFO:CONSOLE(64)] "Looking at video in element remote-view-1", source: http://127.0.0.1:48819/media/webrtc_test_utilities.js (64)
[19745:19745:0722/211548:1282136892:INFO:CONSOLE(64)] "Looking at video in element remote-view-2", source: http://127.0.0.1:48819/media/webrtc_test_utilities.js (64)
../../content/test/webrtc_content_browsertest_base.cc:62: Failure
Value of: ExecuteScriptAndExtractString( shell()->web_contents(), javascript, &result)
Actual: false
Expected: true
Failed to execute javascript call({video: true, audio: true});.
From javascript: (nothing)
When executing 'call({video: true, audio: true});'
../../content/test/webrtc_content_browsertest_base.cc:75: Failure
Failed
../../content/browser/media/webrtc_aecdump_browsertest.cc:26: Failure
Expected: (base::kNullProcessId) != (*id), actual: 0 vs 0
../../content/browser/media/webrtc_aecdump_browsertest.cc:95: Failure
Value of: GetRenderProcessHostId(&render_process_id)
Actual: false
Expected: true
../../content/browser/media/webrtc_aecdump_browsertest.cc:99: Failure
Value of: base::PathExists(dump_file)
Actual: false
Expected: true
../../content/browser/media/webrtc_aecdump_browsertest.cc:101: Failure
Value of: base::GetFileSize(dump_file, &file_size)
Actual: false
Expected: true
../../content/browser/media/webrtc_aecdump_browsertest.cc:102: Failure
Expected: (file_size) > (0), actual: 0 vs 0
[ FAILED ] WebRtcAecDumpBrowserTest.CallWithAecDump, where TypeParam = and GetParam() = (361 ms)

Original issue's description:
> Allow more than 2 input channels in AudioProcessing.
>
> The number of output channels is constrained to be equal to either 1 or the
> number of input channels.
>
> R=aluebs@webrtc.org, andrew@webrtc.org, pbos@webrtc.org
>
> Committed: https://chromium.googlesource.com/external/webrtc/+/c204754b7a0cc801c70e8ce6c689f57f6ce00b3b

TBR=andrew@webrtc.org,aluebs@webrtc.org,ajm@chromium.org,pbos@chromium.org,pbos@webrtc.org,mgraczyk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.webrtc.org/1253573005

Cr-Commit-Position: refs/heads/master@{#9621}
/external/webrtc/webrtc/common_audio/wav_file.cc
c204754b7a0cc801c70e8ce6c689f57f6ce00b3b 23-Jul-2015 Michael Graczyk <mgraczyk@chromium.org> Allow more than 2 input channels in AudioProcessing.

The number of output channels is constrained to be equal to either 1 or the
number of input channels.

R=aluebs@webrtc.org, andrew@webrtc.org, pbos@webrtc.org

Review URL: https://codereview.webrtc.org/1226093007 .

Cr-Commit-Position: refs/heads/master@{#9619}
/external/webrtc/webrtc/common_audio/wav_file.cc
5a92b78e868983096a883e7016727981b375582d 15-Jan-2015 mgraczyk@chromium.org <mgraczyk@chromium.org> Add beamforming to audioproc_float utility.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41469004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8069 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/common_audio/wav_file.cc
0ab42bc3f6438db4194b3d77b66629413c7038da 17-Dec-2014 andrew@webrtc.org <andrew@webrtc.org> Make safe_conversions suitable for rtc_base_approved.

Since we want to use checked_cast in WavReader.

R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/32839004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7937 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/common_audio/wav_file.cc
2510d11c0f69c8cf840279da6593ec34a80a9b0c 16-Dec-2014 andrew@webrtc.org <andrew@webrtc.org> Add (safe) uint32_t cast to fix Win64 build.

TBR=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36539004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7916 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/common_audio/wav_file.cc
048c5029f50aea49456f9531f5be1cb2aa598a3e 16-Dec-2014 andrew@webrtc.org <andrew@webrtc.org> Handle all permissible PCM fields with WavReader.

I discovered the hard way that Adobe Audition writes an 18 byte format
header with an extra (zero) extension size field. Although:
https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
indicates this field shouldn't exist for PCM, the documentation here:
http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/WAVE/WAVE.html
doesn't list it as strictly forbidden, only that it _must_ exist for
non-PCM formats.

Audition can write metadata to the file after the audio data, which is
also not forbidden. We now ensure to read only up to the audio payload
length to avoid reading the metadata.

R=aluebs@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33629004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7915 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/common_audio/wav_file.cc
f866b2d9f97f51ed2a177bab2608b9bbfa78931e 03-Nov-2014 andrew@webrtc.org <andrew@webrtc.org> Restore the void return type on WriteWavHeader.

Karl pointed out that the user can check the validity of the input
parameters with CheckWavParameters prior to calling.

TBR=kwiberg

Review URL: https://webrtc-codereview.appspot.com/23339004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7597 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/common_audio/wav_file.cc
a3ed713dad5ccad03e2f5d775081143babd19097 31-Oct-2014 andrew@webrtc.org <andrew@webrtc.org> Add a WavReader counterpart to WavWriter.

Don't bother with a C interface as we currently have no need to call
this from C code. The first use will be in the audioproc tool.

R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/30829004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7585 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/common_audio/wav_file.cc