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

Unified Diff: trunk/src/media/filters/audio_renderer_algorithm.h

Issue 312963003: Revert 258215 "Remove muting for extreme playbackRates." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 months 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
« no previous file with comments | « no previous file | trunk/src/media/filters/audio_renderer_algorithm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/filters/audio_renderer_algorithm.h
===================================================================
--- trunk/src/media/filters/audio_renderer_algorithm.h (revision 274695)
+++ trunk/src/media/filters/audio_renderer_algorithm.h (working copy)
@@ -19,6 +19,8 @@
// are preserved. See audio_renderer_algorith.cc for a more elaborate
// description of the algorithm.
//
+// Audio at very low or very high playback rates are muted to preserve quality.
+//
#ifndef MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_
#define MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_H_
@@ -82,6 +84,9 @@
// Returns the samples per second for this audio stream.
int samples_per_second() { return samples_per_second_; }
+ // Is the sound currently muted?
+ bool is_muted() { return muted_; }
+
private:
// Within |search_block_|, find the block of data that is most similar to
// |target_block_|, and write it in |optimal_block_|. This method assumes that
@@ -135,6 +140,12 @@
// Buffered audio data.
AudioBufferQueue audio_buffer_;
+ // True if the audio should be muted.
+ bool muted_;
+
+ // If muted, keep track of partial frames that should have been skipped over.
+ double muted_partial_frame_;
+
// How many frames to have in the queue before we report the queue is full.
int capacity_;
« no previous file with comments | « no previous file | trunk/src/media/filters/audio_renderer_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698