Bug 1240423 - part7 : add attributes for AudioChannelLog.
MozReview-Commit-ID: KryRjeqBUDE
--- a/dom/audiochannel/AudioChannelAgent.cpp
+++ b/dom/audiochannel/AudioChannelAgent.cpp
@@ -220,18 +220,18 @@ AudioChannelAgent::NotifyStartedPlaying(
service->RegisterAudioChannelAgent(this,
static_cast<AudioChannelService::AudibleState>(aAudible));
AudioPlaybackConfig config = service->GetMediaConfig(mWindow,
mAudioChannelType);
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
("AudioChannelAgent, NotifyStartedPlaying, this = %p, "
- "mute = %d, volume = %f, suspend = %d\n", this,
- config.mMuted, config.mVolume, config.mSuspend));
+ "audible = %d, mute = %d, volume = %f, suspend = %d\n", this,
+ aAudible, config.mMuted, config.mVolume, config.mSuspend));
aConfig->SetConfig(config.mVolume, config.mMuted, config.mSuspend);
mIsRegToService = true;
return NS_OK;
}
NS_IMETHODIMP
AudioChannelAgent::NotifyStoppedPlaying()
@@ -253,17 +253,17 @@ AudioChannelAgent::NotifyStoppedPlaying(
return NS_OK;
}
NS_IMETHODIMP
AudioChannelAgent::NotifyStartedAudible(bool aAudible, uint32_t aReason)
{
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
("AudioChannelAgent, NotifyStartedAudible, this = %p, "
- "audible = %d\n", this, aAudible));
+ "audible = %d, reason = %d\n", this, aAudible, aReason));
RefPtr<AudioChannelService> service = AudioChannelService::GetOrCreate();
if (NS_WARN_IF(!service)) {
return NS_ERROR_FAILURE;
}
service->AudioAudibleChanged(
this,
--- a/dom/audiochannel/AudioChannelService.cpp
+++ b/dom/audiochannel/AudioChannelService.cpp
@@ -123,17 +123,19 @@ public:
nsAutoString state;
GetActiveState(state);
observerService->NotifyObservers(ToSupports(mWindow),
"audio-playback",
state.get());
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
- ("AudioPlaybackRunnable, active = %d\n", mActive));
+ ("AudioPlaybackRunnable, active = %d, reason = %d\n",
+ mActive, mReason));
+
return NS_OK;
}
private:
void GetActiveState(nsAString& astate)
{
if (mActive) {
CopyASCIItoUTF16("active", astate);