Add AudioFIFO class and simplify AudioPullFIFO
https://bugs.webkit.org/show_bug.cgi?id=90398
Patch by Raymond Toy <rtoy@google.com> on 2012-07-03
Reviewed by Chris Rogers.
No new tests. This code will be used in audio back-end implementation.
Add AudioFIFO class to implement main parts of FIFO. Simplify
implementation of AudioPushFIFO by using AudioFIFO.
* WebCore.gypi: Add new files.
New AudioFIFO class
* platform/audio/AudioFIFO.cpp: Copied from Source/WebCore/platform/audio/AudioPullFIFO.cpp.
(WebCore):
(WebCore::AudioFIFO::AudioFIFO):
(WebCore::AudioFIFO::consume):
(WebCore::AudioFIFO::push):
(WebCore::AudioFIFO::findWrapLengths):
* platform/audio/AudioFIFO.h: Copied from Source/WebCore/platform/audio/AudioPullFIFO.h.
(WebCore):
(AudioFIFO):
(WebCore::AudioFIFO::framesInFifo):
(WebCore::AudioFIFO::updateIndex):
Use AudioFIFO
* platform/audio/AudioPullFIFO.cpp:
(WebCore::AudioPullFIFO::AudioPullFIFO):
(WebCore::AudioPullFIFO::consume):
(WebCore::AudioPullFIFO::fillBuffer):
* platform/audio/AudioPullFIFO.h:
(AudioPullFIFO):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121810
268f45cc-cd09-0410-ab3c-
d52691b4dbfc