mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1227411 add logging of AudioParam API use r=padenot
This commit is contained in:
parent
1af05d1e71
commit
0ac470696b
@ -115,9 +115,48 @@ AudioParam::Stream()
|
||||
return mStream;
|
||||
}
|
||||
|
||||
static const char*
|
||||
ToString(AudioTimelineEvent::Type aType)
|
||||
{
|
||||
switch (aType) {
|
||||
case AudioTimelineEvent::SetValue:
|
||||
return "SetValue";
|
||||
case AudioTimelineEvent::SetValueAtTime:
|
||||
return "SetValueAtTime";
|
||||
case AudioTimelineEvent::LinearRamp:
|
||||
return "LinearRamp";
|
||||
case AudioTimelineEvent::ExponentialRamp:
|
||||
return "ExponentialRamp";
|
||||
case AudioTimelineEvent::SetTarget:
|
||||
return "SetTarget";
|
||||
case AudioTimelineEvent::SetValueCurve:
|
||||
return "SetValueCurve";
|
||||
case AudioTimelineEvent::Stream:
|
||||
return "Stream";
|
||||
case AudioTimelineEvent::Cancel:
|
||||
return "Cancel";
|
||||
default:
|
||||
return "unknown AudioTimelineEvent";
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioParam::SendEventToEngine(const AudioTimelineEvent& aEvent)
|
||||
{
|
||||
WEB_AUDIO_API_LOG("%f: %s for %u %s %s=%g time=%f %s=%g",
|
||||
GetParentObject()->CurrentTime(),
|
||||
mName, ParentNodeId(), ToString(aEvent.mType),
|
||||
aEvent.mType == AudioTimelineEvent::SetValueCurve ?
|
||||
"length" : "value",
|
||||
aEvent.mType == AudioTimelineEvent::SetValueCurve ?
|
||||
static_cast<double>(aEvent.mCurveLength) :
|
||||
static_cast<double>(aEvent.mValue),
|
||||
aEvent.Time<double>(),
|
||||
aEvent.mType == AudioTimelineEvent::SetValueCurve ?
|
||||
"duration" : "constant",
|
||||
aEvent.mType == AudioTimelineEvent::SetValueCurve ?
|
||||
aEvent.mDuration : aEvent.mTimeConstant);
|
||||
|
||||
AudioNodeStream* stream = mNode->GetStream();
|
||||
if (stream) {
|
||||
stream->SendTimelineEvent(mIndex, aEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user