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

Unified Diff: chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc

Issue 2937123005: Add a general PostProcessorUnittest. (Closed)
Patch Set: rename test to test_support Created 3 years, 6 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
Index: chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
index 3779dcdb65afba5af17754efa9b763da6c3d665d..fa8acf5214ff0f2aed1754ce4e83482c8d49d352 100644
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
@@ -26,6 +26,7 @@
#include "chromecast/media/cma/backend/alsa/filter_group.h"
#include "chromecast/media/cma/backend/alsa/post_processing_pipeline_parser.h"
#include "chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h"
+#include "chromecast/public/media/audio_post_processor_shlib.h"
#include "media/audio/audio_device_description.h"
#include "media/base/audio_bus.h"
#include "media/base/audio_sample_types.h"
@@ -81,7 +82,6 @@ const bool kPcmRecoverIsSilent = false;
const int kPreventUnderrunChunkSize = 512;
const int kDefaultCheckCloseTimeoutMs = 2000;
-const int kMaxWriteSizeMs = 20;
// The minimum amount of data that we allow in the ALSA buffer before starting
// to skip inputs with no available data.
const int kMinBufferedDataMs = 8;
@@ -851,7 +851,8 @@ bool StreamMixerAlsa::TryWriteFrames() {
const int min_frames_in_buffer =
output_samples_per_second_ * kMinBufferedDataMs / 1000;
- int chunk_size = output_samples_per_second_ * kMaxWriteSizeMs / 1000;
+ int chunk_size =
+ output_samples_per_second_ * kMaxAudioWriteTimeMilliseconds / 1000;
bool is_silence = true;
for (auto&& filter_group : filter_groups_) {
filter_group->ClearActiveInputs();

Powered by Google App Engine
This is Rietveld 408576698