mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1525278
- Assert AudioStream is not errored when SetVolume is called. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D18682 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
6dd524af5b
commit
16529fa15f
@ -397,12 +397,11 @@ nsresult AudioStream::OpenCubeb(cubeb* aContext, cubeb_stream_params& aParams,
|
||||
void AudioStream::SetVolume(double aVolume) {
|
||||
MOZ_ASSERT(aVolume >= 0.0 && aVolume <= 1.0, "Invalid volume");
|
||||
|
||||
#ifdef DEBUG
|
||||
{
|
||||
MonitorAutoLock mon(mMonitor);
|
||||
MOZ_ASSERT(mState != SHUTDOWN, "Don't set volume after shutdown.");
|
||||
MOZ_DIAGNOSTIC_ASSERT(mState != ERRORED, "Don't set volume if stream got error.");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cubeb_stream_set_volume(mCubebStream.get(),
|
||||
aVolume * CubebUtils::GetVolumeScale()) !=
|
||||
|
Loading…
Reference in New Issue
Block a user