зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1197673 - Use float type for SetAudioOutputVolume. r=eitan
This commit is contained in:
Родитель
3369990f9c
Коммит
957ad16ed7
|
@ -23,7 +23,7 @@ async protocol PSpeechSynthesisRequest
|
|||
|
||||
ForceEnd();
|
||||
|
||||
SetAudioOutputVolume(uint32_t aVolume);
|
||||
SetAudioOutputVolume(float aVolume);
|
||||
|
||||
child:
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ SpeechTaskChild::ForceEnd()
|
|||
}
|
||||
|
||||
void
|
||||
SpeechTaskChild::SetAudioOutputVolume(uint32_t aVolume)
|
||||
SpeechTaskChild::SetAudioOutputVolume(float aVolume)
|
||||
{
|
||||
if (mActor) {
|
||||
mActor->SendSetAudioOutputVolume(aVolume);
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
|
||||
virtual void ForceEnd() override;
|
||||
|
||||
virtual void SetAudioOutputVolume(uint32_t aVolume) override;
|
||||
virtual void SetAudioOutputVolume(float aVolume) override;
|
||||
|
||||
private:
|
||||
SpeechSynthesisRequestChild* mActor;
|
||||
|
|
|
@ -128,7 +128,7 @@ SpeechSynthesisRequestParent::RecvForceEnd()
|
|||
}
|
||||
|
||||
bool
|
||||
SpeechSynthesisRequestParent::RecvSetAudioOutputVolume(const uint32_t& aVolume)
|
||||
SpeechSynthesisRequestParent::RecvSetAudioOutputVolume(const float& aVolume)
|
||||
{
|
||||
MOZ_ASSERT(mTask);
|
||||
mTask->SetAudioOutputVolume(aVolume);
|
||||
|
|
|
@ -70,7 +70,7 @@ protected:
|
|||
|
||||
virtual bool RecvForceEnd() override;
|
||||
|
||||
virtual bool RecvSetAudioOutputVolume(const uint32_t& aVolume) override;
|
||||
virtual bool RecvSetAudioOutputVolume(const float& aVolume) override;
|
||||
};
|
||||
|
||||
class SpeechTaskParent : public nsSpeechTask
|
||||
|
|
|
@ -685,7 +685,7 @@ nsSpeechTask::DestroyAudioChannelAgent()
|
|||
NS_IMETHODIMP
|
||||
nsSpeechTask::WindowVolumeChanged(float aVolume, bool aMuted)
|
||||
{
|
||||
SetAudioOutputVolume(mVolume * aVolume * aMuted);
|
||||
SetAudioOutputVolume(aMuted ? 0.0 : mVolume * aVolume);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -697,7 +697,7 @@ nsSpeechTask::WindowAudioCaptureChanged()
|
|||
}
|
||||
|
||||
void
|
||||
nsSpeechTask::SetAudioOutputVolume(uint32_t aVolume)
|
||||
nsSpeechTask::SetAudioOutputVolume(float aVolume)
|
||||
{
|
||||
if (mStream) {
|
||||
mStream->SetAudioOutputVolume(this, aVolume);
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
void SetChosenVoiceURI(const nsAString& aUri);
|
||||
|
||||
virtual void SetAudioOutputVolume(uint32_t aVolume);
|
||||
virtual void SetAudioOutputVolume(float aVolume);
|
||||
|
||||
bool IsPreCanceled()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче