summaryrefslogtreecommitdiffstats
path: root/media/base/audio_buffer_converter_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in media/, take 2.avi2015-12-231-0/+2
| | | | | | | | | | | | This uses an automated script, so it'll catch things the first pass, done by hand, missed. BUG=138542 TBR=dalecurtis@chromium.org NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1542013004 Cr-Commit-Position: refs/heads/master@{#366712}
* Switch to standard integer types in media/.Avi Drissman2015-12-191-8/+3
| | | | | | | | | BUG=138542 TBR=dalecurtis@chromium.org Review URL: https://codereview.chromium.org/1534273002 . Cr-Commit-Position: refs/heads/master@{#366242}
* Refactor AudioParameters member setting.ajm2015-09-081-7/+4
| | | | | | | | | | | | | | | | | | | | | Permit AudioParameters members to be set individually. Allows us to: - Cut back to the one non-default constructor which is frequently used. - Remove a bunch of boilerplate in the common case of updating one member. - Make adding future optional members (e.g. mic_positions) transparent to most callers. Maintain the Reset method but remove the channels parameter to have it mirror the constructor. Make it clear that channels_ is only required to be set explicitly with CHANNEL_LAYOUT_DISCRETE. BUG=497001 Review URL: https://codereview.chromium.org/1304973005 Cr-Commit-Position: refs/heads/master@{#347781}
* Revert of Revert of Remove the last piece of deprecated synchronous IO code. ↵xians2014-08-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #1 of https://codereview.chromium.org/509893002/) Reason for revert: https://codereview.chromium.org/510893003/ fixed the ledger bot, so I am going to revert this revert CL. Original issue's description: > Revert of Remove the last piece of deprecated synchronous IO code. (patchset #5 of https://codereview.chromium.org/460373002/) > > Reason for revert: > Build failure on Google Chrome ChromeOS: > > http://build.chromium.org/p/chromium.chrome/buildstatus?builder=Google%20Chrome%20ChromeOS&number=71164 > > Original issue's description: > > Remove the last piece of deprecated synchronous IO code. > > > > BUG=337096 > > TEST=bots > > > > Committed: https://chromium.googlesource.com/chromium/src/+/c4a64ffdd0d511c66d774341fa0a318af7911193 > > TBR=dalecurtis@chromium.org,ajm@chromium.org,rkc@chromium.org,avi@chromium.org,palmer@chromium.org,xians@chromium.org > NOTREECHECKS=true > BUG=337096 > > Committed: https://chromium.googlesource.com/chromium/src/+/3e8c19c89c16fe8a7c2dfe0cae2990cd4a004339 TBR=dalecurtis@chromium.org,ajm@chromium.org,rkc@chromium.org,avi@chromium.org,palmer@chromium.org,tnagel@chromium.org NOTREECHECKS=true BUG=337096 Review URL: https://codereview.chromium.org/518433002 Cr-Commit-Position: refs/heads/master@{#292463}
* Revert of Remove the last piece of deprecated synchronous IO code. (patchset ↵tnagel2014-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | #5 of https://codereview.chromium.org/460373002/) Reason for revert: Build failure on Google Chrome ChromeOS: http://build.chromium.org/p/chromium.chrome/buildstatus?builder=Google%20Chrome%20ChromeOS&number=71164 Original issue's description: > Remove the last piece of deprecated synchronous IO code. > > BUG=337096 > TEST=bots > > Committed: https://chromium.googlesource.com/chromium/src/+/c4a64ffdd0d511c66d774341fa0a318af7911193 TBR=dalecurtis@chromium.org,ajm@chromium.org,rkc@chromium.org,avi@chromium.org,palmer@chromium.org,xians@chromium.org NOTREECHECKS=true NOTRY=true BUG=337096 Review URL: https://codereview.chromium.org/509893002 Cr-Commit-Position: refs/heads/master@{#292133}
* Remove the last piece of deprecated synchronous IO code.xians2014-08-271-1/+0
| | | | | | | | | BUG=337096 TEST=bots Review URL: https://codereview.chromium.org/460373002 Cr-Commit-Position: refs/heads/master@{#292132}
* Remove AudioBuffer::set_duration(), instead base on frames.dalecurtis@chromium.org2014-05-021-1/+0
| | | | | | | | | | | | | | | | | | | | | wolenetz@ asked on https://codereview.chromium.org/251893002/ why we allow set_duration() to be called. It used to be required since AudioBuffers had no concept of sample rate. However, we now attach a sample rate to every AudioBuffer which allows us to enforce a valid duration for every buffer. This CL also aligns MakeAudioBuffer() to do the same thing with planar and interleaved data for the sake of easier testing. BUG=none TEST=media_unittests NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267779 Review URL: https://codereview.chromium.org/261533002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267842 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Remove AudioBuffer::set_duration(), instead base on frames. ↵falken@chromium.org2014-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/261533002/) Reason for revert: This seems to have broken the chromium.webkit WebKit Win x64 Builder bot. Log: http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win%20x64%20Builder/builds/6453 Snippet from log: c:\b\build\slave\webkit-win-latest-rel-x64\build\src\media\base\audio_buffer.cc(16) : error C2220: warning treated as error - no 'object' file generated c:\b\build\slave\webkit-win-latest-rel-x64\build\src\media\base\audio_buffer.cc(16) : warning C4723: potential divide by 0 Original issue's description: > Remove AudioBuffer::set_duration(), instead base on frames. > > wolenetz@ asked on https://codereview.chromium.org/251893002/ why > we allow set_duration() to be called. It used to be required since > AudioBuffers had no concept of sample rate. However, we now attach > a sample rate to every AudioBuffer which allows us to enforce a > valid duration for every buffer. > > This CL also aligns MakeAudioBuffer() to do the same thing with > planar and interleaved data for the sake of easier testing. > > BUG=none > TEST=media_unittests > NOTRY=true > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267779 TBR=jrummell@chromium.org,dmichael@chromium.org,dalecurtis@chromium.org NOTREECHECKS=true NOTRY=true BUG=none Review URL: https://codereview.chromium.org/265943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267788 0039d316-1c4b-4281-b951-d872f2087c98
* Remove AudioBuffer::set_duration(), instead base on frames.dalecurtis@chromium.org2014-05-021-1/+0
| | | | | | | | | | | | | | | | | | | wolenetz@ asked on https://codereview.chromium.org/251893002/ why we allow set_duration() to be called. It used to be required since AudioBuffers had no concept of sample rate. However, we now attach a sample rate to every AudioBuffer which allows us to enforce a valid duration for every buffer. This CL also aligns MakeAudioBuffer() to do the same thing with planar and interleaved data for the sake of easier testing. BUG=none TEST=media_unittests NOTRY=true Review URL: https://codereview.chromium.org/261533002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267779 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the output request size for AudioBufferConverter requests.dalecurtis@chromium.org2014-04-191-40/+70
| | | | | | | | | | | | | Previously too little data was converted because the code was incorrectly assuming the FIFO was enabled. BUG=364990 TEST=new unittest TBR=scherkus Review URL: https://codereview.chromium.org/243573005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264918 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure AudioBufferConverter uses aligned AudioBus channels.dalecurtis@google.com2014-03-291-1/+3
| | | | | | | | | | | | | SIMD requires aligned loads or it'll crash. BUG=357840 TEST=new unittest. played video back in crashes. R=rileya@chromium.org, scherkus@chromium.org TBR=scherkus Review URL: https://codereview.chromium.org/217923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260336 0039d316-1c4b-4281-b951-d872f2087c98
* Add channel_count parameter back to AudioBuffer creation methods.dalecurtis@google.com2014-03-291-29/+67
| | | | | | | | | | | | | This fixes a bug where we failed to set the proper channel count on AudioBuffers with the CHANNEL_LAYOUT_DISCRETE channel layout. BUG=357801 R=dalecurtis@chromium.org TBR=dmichael Review URL: https://codereview.chromium.org/212103013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260333 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for midstream audio configuration changes.dalecurtis@google.com2014-03-281-0/+186
This introduces a new class, AudioBufferConverter, which takes AudioBuffers of arbitrary formats and converts them to AudioBuffers of a common format. To support config changes seamlessly we use the AudioBufferConverter to convert incoming AudioBuffers to the hardware output format as we get them from the AudioBufferStream. This way the rest of the audio pipeline doesn't need to handle config changes. We only enable this conversion step for DemuxerStreams that support config changes (namely ChunkDemuxerStream). BUG=347270 TEST=AudioBufferConverterTest NOTRY=true R=dalecurtis@chromium.org Review URL: https://codereview.chromium.org/177333003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260071 0039d316-1c4b-4281-b951-d872f2087c98