Bug 841020 - Restore missing SetVolume when initializing AudioStream. r=cpearce

This commit is contained in:
Matthew Gregan 2013-02-14 10:57:46 +13:00
parent 3375a513c3
commit 23725cd473

View File

@ -993,11 +993,11 @@ void MediaDecoderStateMachine::AudioLoop()
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
mAudioCompleted = false;
audioStartTime = mAudioStartTime;
NS_ASSERTION(audioStartTime != -1, "Should have audio start time by now");
channels = mInfo.mAudioChannels;
rate = mInfo.mAudioRate;
audioChannelType = mDecoder->GetAudioChannelType();
NS_ASSERTION(audioStartTime != -1, "Should have audio start time by now");
audioChannelType = mDecoder->GetAudioChannelType();
volume = mVolume;
preservesPitch = mPreservesPitch;
playbackRate = mPlaybackRate;
@ -1009,6 +1009,7 @@ void MediaDecoderStateMachine::AudioLoop()
// initializing.
nsAutoPtr<AudioStream> audioStream(AudioStream::AllocateStream());
audioStream->Init(channels, rate, audioChannelType);
audioStream->SetVolume(volume);
audioStream->SetPreservesPitch(preservesPitch);
if (playbackRate != 1.0) {
NS_ASSERTION(playbackRate != 0,