Skip to content

Commit

Permalink
[Chromecast] Fix missing default stream volume.
Browse files Browse the repository at this point in the history
This missing default can cause some audio streams to be muted by
default.

Bug: b/113075348
Test: Ran changes on developer device
Change-Id: Icaa75cf3d78a85f978b91dfa1de44d21b9266328
Reviewed-on: https://chromium-review.googlesource.com/1192114
Commit-Queue: Michael Nye <michaelnye@chromium.org>
Reviewed-by: Kenneth MacKay <kmackay@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589000}
  • Loading branch information
Michael Nye authored and Commit Bot committed Sep 5, 2018
1 parent 5021e38 commit f5a01d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,18 @@ MediaPipelineBackendManager::MediaPipelineBackendManager(
new base::ObserverListThreadSafe<AllowVolumeFeedbackObserver>()),
global_volume_multipliers_({{AudioContentType::kMedia, 1.0f},
{AudioContentType::kAlarm, 1.0f},
{AudioContentType::kCommunication, 1.0f}},
{AudioContentType::kCommunication, 1.0f},
{AudioContentType::kOther, 1.0f}},
base::KEEP_FIRST_OF_DUPES),
buffer_delegate_(nullptr),
weak_factory_(this) {
DCHECK(media_task_runner_);
DCHECK(playing_audio_streams_count_.size() ==
static_cast<unsigned long>(AudioContentType::kNumTypes));
DCHECK(playing_noneffects_audio_streams_count_.size() ==
static_cast<unsigned long>(AudioContentType::kNumTypes));
DCHECK(global_volume_multipliers_.size() ==
static_cast<unsigned long>(AudioContentType::kNumTypes));
for (int i = 0; i < NUM_DECODER_TYPES; ++i) {
decoder_count_[i] = 0;
}
Expand Down
1 change: 1 addition & 0 deletions chromecast/public/volume_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ enum class AudioContentType {
kAlarm, // Alarm sounds.
kCommunication, // Voice communication, eg assistant TTS.
kOther, // No content type volume control (only per-stream control).
kNumTypes, // Not a valid type; should always be last in the enum.
};

// Observer for volume/mute state changes. This is useful to detect volume
Expand Down

0 comments on commit f5a01d2

Please sign in to comment.