Closed Bug 1025864 Opened 10 years ago Closed 7 years ago

Node parameters in the inspector are not updated often enough

Categories

(DevTools Graveyard :: Web Audio Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sole, Unassigned)

References

Details

Attachments

(1 file, 5 obsolete files)

It might be interesting to implement some sort of "Observe" in nodes to keep track of actual parameter values when a given node is being inspected.

Currently when a node is being inspected its values are "static" so if they are changed via code they are not updated in the inspector until the node is clicked again (which I guess prompts a refresh on the properties inspector)

Suppose I am inspecting an oscillator and its frequency is 440.
If I then go to the console and change its frequency to 220 the value will transition to that and the effects will be audible, but the inspector will still show 440.
Only if I click again over the node I'll get the new value 220.
Ah good idea, one of the reasons for moving to only being able to see one node at a time was this -- this should be relatively straight forward!
Assignee: nobody → jsantell
After playing with this for a bit, the call-watcher instrumentation won't work for AudioParam (and escalated properties like `frequency`) and implementing an instrumenter in audionodeactors won't work as these don't have built in setters, unless we proxy the entire object, which sounds scary. Still thinking about possible solutions that don't have unintended side effects
No longer blocks: 1022248
Some progress I've made.

Since AudioParams can be changed via automation, a setter would not capture these values, and observer/proxies would be too cludgey to continue to support things like automation as well, so the only other option (AFAICT) is polling.

This provides AudioNodeActor methods to decide whether or not we should be polling on the server for changes, emitting to the actor fronts. The devtool GUI turns on polling for the active nodes, and turns the previously selected node off, so we're only polling for the node of interest (on the server, minimizing RDP/x-boundary calls), and emitting to the front if a change was detected.

Problem with this currently is this fails for GC (only in e10s), when we have a node selected (so polling is on), this node will never get GC'd, due to accessing the underlying audio node's WeakRef in any capacity, within a timer.
This got larger than expected. Lots of edge cases to test. Polling most performant option. Had to do some magic to have it work in e10s.
Attachment #8468099 - Attachment is obsolete: true
Attachment #8469664 - Flags: review?(vporof)
Fixed the nullifying protocol.js Option issue, r?ing dcamp as well
Attachment #8469664 - Attachment is obsolete: true
Attachment #8469664 - Flags: review?(vporof)
Attachment #8470997 - Flags: review?(vporof)
Attachment #8470997 - Flags: review?(dcamp)
Comment on attachment 8470997 [details] [diff] [review]
1025864-observe-audioparams.patch

Review of attachment 8470997 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/devtools/server/protocol.js
@@ +447,5 @@
>      Arg.prototype.initialize.call(this, index, type)
>    },
>  
>    write: function(arg, ctx, name) {
> +    let v = arg[name];

Will this generate an exception if arg is actually undefined?  It's usually ok to not provide an options object at all.
Yup, you are right -- I jumped the gun. Should be fixed here.
Attachment #8470997 - Attachment is obsolete: true
Attachment #8470997 - Flags: review?(vporof)
Attachment #8470997 - Flags: review?(dcamp)
Attachment #8471016 - Flags: review?(vporof)
Attachment #8471016 - Flags: review?(dcamp)
Comment on attachment 8471016 [details] [diff] [review]
1025864-observe-audioparams.patch

Review of attachment 8471016 [details] [diff] [review]:
-----------------------------------------------------------------

r+ for protocol.js change.
Attachment #8471016 - Flags: review?(dcamp) → review+
handling protocol.js changes in bug 1052118
Removed protocol.js changes here
Attachment #8471016 - Attachment is obsolete: true
Attachment #8471016 - Flags: review?(vporof)
Attachment #8471198 - Flags: review?(vporof)
Comment on attachment 8471198 [details] [diff] [review]
1025864-observe-audioparams.patch

Review of attachment 8471198 [details] [diff] [review]:
-----------------------------------------------------------------

Lot of code to digest, but pretty.

::: toolkit/devtools/server/actors/webaudio.js
@@ +263,5 @@
>    }, {
>      response: { params: RetVal("json") }
> +  }),
> +
> +  isAlive: function () {

Nit: maybe comment this function? When is this dead? (I know, GC, CC etc., but readers of this code may be confused).
Attachment #8471198 - Flags: review?(vporof) → review+
https://hg.mozilla.org/integration/fx-team/rev/e7215fed014f
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/e7215fed014f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
Backed out for causing bug 1035820 with no end in sight.
https://hg.mozilla.org/integration/fx-team/rev/10346f72cdcb
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: Firefox 34 → ---
Depends on: 1035820
Blocks: 1055215
No longer blocks: 1040352
No longer blocks: 1055215
Assignee: jsantell → nobody
Mass-closing inactive (2 years+) bugs on unmaintained devtools components.
Status: REOPENED → RESOLVED
Closed: 10 years ago7 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: