Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1601)

Unified Diff: media/filters/audio_renderer_algorithm.h

Issue 11573023: Protect AudioRendererAlgorithm from invalid step sizes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Amend test expectations. Comments. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/audio_renderer_algorithm.h
diff --git a/media/filters/audio_renderer_algorithm.h b/media/filters/audio_renderer_algorithm.h
index 644592ca1646dfad4b964f74f6ba7c5db9ab105a..080a11d2bee20c8100e79644d9036c39525314bb 100644
--- a/media/filters/audio_renderer_algorithm.h
+++ b/media/filters/audio_renderer_algorithm.h
@@ -88,6 +88,8 @@ class MEDIA_EXPORT AudioRendererAlgorithm {
int bytes_per_channel() { return bytes_per_channel_; }
+ int samples_per_second() { return samples_per_second_; }
+
bool is_muted() { return muted_; }
private:
@@ -103,7 +105,7 @@ class MEDIA_EXPORT AudioRendererAlgorithm {
// data at normal speed, then we "fast forward" by dropping the next bit of
// audio data, and then we stich the pieces together by crossfading from one
// audio chunk to the next.
- bool OutputFasterPlayback(uint8* dest);
+ bool OutputFasterPlayback(uint8* dest, int input_step, int output_step);
// Fills |dest| with one frame of audio data at slower than normal speed.
// Returns true if a frame was rendered, false otherwise.
@@ -114,7 +116,7 @@ class MEDIA_EXPORT AudioRendererAlgorithm {
// by repeating some of the audio data from the previous audio segment.
// Segments are stiched together by crossfading from one audio chunk to the
// next.
- bool OutputSlowerPlayback(uint8* dest);
+ bool OutputSlowerPlayback(uint8* dest, int input_step, int output_step);
// Resets the window state to the start of a new window.
void ResetWindow();
« no previous file with comments | « no previous file | media/filters/audio_renderer_algorithm.cc » ('j') | media/filters/audio_renderer_algorithm_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698