зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1187817. Part 2 - remove unused code. r=kinetik.
This commit is contained in:
Родитель
ae47236478
Коммит
494bca7d4f
|
@ -36,13 +36,7 @@ AudioSink::AudioSink(MediaQueue<AudioData>& aAudioQueue,
|
|||
, mLastGoodPosition(0)
|
||||
, mInfo(aInfo)
|
||||
, mChannel(aChannel)
|
||||
, mVolume(1.0)
|
||||
, mPlaybackRate(1.0)
|
||||
, mPreservesPitch(false)
|
||||
, mStopAudioThread(false)
|
||||
, mSetVolume(false)
|
||||
, mSetPlaybackRate(false)
|
||||
, mSetPreservesPitch(false)
|
||||
, mPlaying(true)
|
||||
{
|
||||
}
|
||||
|
@ -226,7 +220,6 @@ AudioSink::InitializeAudioStream()
|
|||
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
mAudioStream = audioStream;
|
||||
UpdateStreamSettings();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -290,8 +283,6 @@ AudioSink::IsPlaybackContinuing()
|
|||
return false;
|
||||
}
|
||||
|
||||
UpdateStreamSettings();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -449,40 +440,6 @@ AudioSink::PlayFromAudioQueue()
|
|||
return audio->mFrames;
|
||||
}
|
||||
|
||||
void
|
||||
AudioSink::UpdateStreamSettings()
|
||||
{
|
||||
AssertCurrentThreadInMonitor();
|
||||
|
||||
bool setVolume = mSetVolume;
|
||||
bool setPlaybackRate = mSetPlaybackRate;
|
||||
bool setPreservesPitch = mSetPreservesPitch;
|
||||
double volume = mVolume;
|
||||
double playbackRate = mPlaybackRate;
|
||||
bool preservesPitch = mPreservesPitch;
|
||||
|
||||
mSetVolume = false;
|
||||
mSetPlaybackRate = false;
|
||||
mSetPreservesPitch = false;
|
||||
|
||||
{
|
||||
ReentrantMonitorAutoExit exit(GetReentrantMonitor());
|
||||
if (setVolume) {
|
||||
mAudioStream->SetVolume(volume);
|
||||
}
|
||||
|
||||
if (setPlaybackRate &&
|
||||
NS_FAILED(mAudioStream->SetPlaybackRate(playbackRate))) {
|
||||
NS_WARNING("Setting the playback rate failed in AudioSink.");
|
||||
}
|
||||
|
||||
if (setPreservesPitch &&
|
||||
NS_FAILED(mAudioStream->SetPreservesPitch(preservesPitch))) {
|
||||
NS_WARNING("Setting the pitch preservation failed in AudioSink.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioSink::StartAudioStreamPlaybackIfNeeded()
|
||||
{
|
||||
|
|
|
@ -114,8 +114,6 @@ private:
|
|||
// audio data to the audio hardware. Called on the audio thread.
|
||||
uint32_t PlayFromAudioQueue();
|
||||
|
||||
void UpdateStreamSettings();
|
||||
|
||||
// If we have already written enough frames to the AudioStream, start the
|
||||
// playback.
|
||||
void StartAudioStreamPlaybackIfNeeded();
|
||||
|
@ -172,16 +170,8 @@ private:
|
|||
|
||||
dom::AudioChannel mChannel;
|
||||
|
||||
double mVolume;
|
||||
double mPlaybackRate;
|
||||
bool mPreservesPitch;
|
||||
|
||||
bool mStopAudioThread;
|
||||
|
||||
bool mSetVolume;
|
||||
bool mSetPlaybackRate;
|
||||
bool mSetPreservesPitch;
|
||||
|
||||
bool mPlaying;
|
||||
|
||||
MozPromiseHolder<GenericPromise> mEndPromise;
|
||||
|
|
Загрузка…
Ссылка в новой задаче