summaryrefslogtreecommitdiffstats
path: root/media/base/audio_pull_fifo.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove extra memcpys from AudioPullFifo.dalecurtis@chromium.org2013-05-231-8/+5
| | | | | | | | | | | | | | | | | | Due to AudioPullFifo always clearing the |fifo_| before reading another block from |read_cb_| we can actually remove the AudioFifo object in favor of a plain AudioBus. Speedup is ~17% over the old version per AudioConverter benchmark using --audio-converter-iterations=500000: Old: 430.04ms New: 355.44ms BUG=none TEST=media_unittests Review URL: https://chromiumcodereview.appspot.com/15394003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201662 0039d316-1c4b-4281-b951-d872f2087c98
* Collapse AudioRendererMixer and OnMoreDataResampler into AudioTransform.dalecurtis@chromium.org2012-11-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have roughly equivalent functionality in two places, and the CloudView project will add a third. As such there's a need for a single super class which can handle mixing, resampling, and general conversion from one set of AudioParameters to another. This change introduces the AudioTransform object which collapses the key functionality from AudioRendererMixer and OnMoreDataResampler into a single AudioTransform class which can do everything and is oblivious to the peculiars of RenderCallback vs AudioSourceCallback. It also introduces output_frames_ready() methods to the AudioPullFifo and MultiChannelResampler classes so that buffer delay can be measured accurately without resorting to input vs output byte counting. Due to the bulk of AudioRendererMixer's functionality moving into the new AudioTransform, it made sense to move some decisions into the AudioRendererMixerInput class as well. On my Z600, benchmarking 50000 iterations: Convert() w/ FIFO took 7030.11ms. Convert() w/o FIFO took 5218.83ms. BUG=none TEST=AudioTransform* unittests. TBR=sergeyu Review URL: https://chromiumcodereview.appspot.com/11410012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168976 0039d316-1c4b-4281-b951-d872f2087c98
* Adds media::AudioPullFifo class to Chrome.scherkus@chromium.org2012-09-101-0/+62
A FIFO (First In First Out) buffer to handle mismatches in buffer sizes between a provider and consumer. The consumer will pull data from this FIFO. If data is already available in the FIFO, it is provided to the consumer. If insufficient data is available to satisfy the request, the FIFO will ask the provider for more data to fulfill a request. Patch by henrika@chromium.org: http://codereview.chromium.org/10915123/ BUG=none TEST=--gtest_filter=AudioPullFifoTest.* TBR=henrika Review URL: https://chromiumcodereview.appspot.com/10914178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155744 0039d316-1c4b-4281-b951-d872f2087c98