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

Unified Diff: media/base/android/audio_media_codec_decoder.cc

Issue 2042563002: Fix initialization of AudioTrack related output parameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « media/base/android/audio_decoder_job.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/audio_media_codec_decoder.cc
diff --git a/media/base/android/audio_media_codec_decoder.cc b/media/base/android/audio_media_codec_decoder.cc
index 299a70a48c656f5c0469f19fa2c1d5c267b117b3..4533c6cbd8eb0f5df92eff19a09067f6c14d8569 100644
--- a/media/base/android/audio_media_codec_decoder.cc
+++ b/media/base/android/audio_media_codec_decoder.cc
@@ -159,6 +159,12 @@ MediaCodecDecoder::ConfigStatus AudioMediaCodecDecoder::ConfigureInternal(
DVLOG(0) << class_name() << "::" << __FUNCTION__ << " succeeded";
+ // ConfigureAndStart() creates AudioTrack with sampling rate and channel count
+ // from |configs_|. Keep |output_...| in sync to detect the changes that might
+ // come with OnOutputFormatChanged().
+ output_sampling_rate_ = configs_.audio_sampling_rate;
+ output_num_channels_ = configs_.audio_channels;
+
SetVolumeInternal();
frame_count_ = 0;
« no previous file with comments | « media/base/android/audio_decoder_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698