* avm2: Add error 1087
* avm2: Add deep_copy method to XmlObject
Changes existing AS3 copy method to use this instead
* avm2: Add a few utility methods to E4XNode
* avm2: Change XML.replace impl to use new utility methods
* avm2: allow setting XML/XMLList as a element
* avm2: Fix `xml_namespaced_property` test failure
* chore: fmt
* chore: Appease clippy
* avm2: Add test for XML/XMLList as element
* avm2/tests: Implement XML.setName; add a test
* avm2: Basic support for QNames in XML.setName (no namespace support yet)
* avm2: Reorder order of Attribute/Element/PI checks in XML.setName
* avm2: Throw error #1117 when the name passed to XML.setName is not a valid XML name
Previously, the volume transformation to adapt the volume for
logarithmic hearing has been performed in the VolumeControls Rust struct
and TypeScript class each.
Since this calculation is the same on desktop and web and should be
implemented in the audio backend, it has been moved into the
AudioMixer::mix_audio method.
The VolumeControls struct and class now only calculate the linear volume
out of the checkbox and the slider.
Player::set_volume and Player::volume now don't take and return the
adapted volume, but use the linear volume (which gets saved internally).
The web version of Ruffle now has a volume controls window. It can be
accessed through the right-click menu (Right-click > Volume controls).
It contains a mute button and a slider from 0 to 100.
To achieve this, a new volume controls modal has been added to the
shadow template.
TypeScript is used to create texts, set the controls and add event
listeners to update the settings and controls when being changed.
The volume settings set in the GUI are saved in a new VolumeControls
class, which is also used to calculate the real volume (adapted for
logarithmic hearing) out of the entered volume and the mute checkbox.
As soon as the volume is changed in the GUI, the real volume will be set
in the Ruffle instance.
The existing ftl files have been adapted (and new ones have been
created) to include the new multilingual text in the right-click menu
and the volume controls window.
This closes#1771.
The desktop version of Ruffle now has a volume controls window. It can
be accessed through the menu bar (Controls > Volume controls).
It contains a mute button and a slider from 0 to 100.
The volume settings set in the GUI are saved in a new VolumeControls
struct, which is also used to calculate the real volume (adapted for
logarithmic hearing) out of the entered volume and the mute checkbox.
As soon as the volume is changed in the GUI, the real volume will be set
in the player (if the player exists).
The player doesn't set its volume level according to the PlayerOptions
after its creation anymore. Instead, RuffleGui::on_player_created now
gets the player and sets its volume to the real volume set in the GUI.
The volume in the GUI itself defaults to the PlayerOptions value.
This also fixes the issue that the PlayerOptions volume has previously
not been adapted for logarithmic hearing.
The existing ftl files have been adapted (and new ones have been
created) to include the new multilingual text in the menu bar and the
volume controls window.
Some SWFS (in particular, anything using Unity) call
avmplus.describeTypeJSON, and rely on the behavior of the various
flags.
This PR changes our internal implementation to implement
describeTypeJSON (producing an `Object` with dynamic fields).
We then convert this to XML in `describeType`, using an implementation
inspired by avmplus.
The existing describeType tests are passing - in a follow-up PR,
I'll add tests for describeTypeJSON
Some experimentation with Pixel Bender Studio shows
that Opcode::Loop has a 23-byte payload. I haven't tried to
figure out how to interpet the payload yet, but we can now
skip over the opcode instead of bailing out entirely.
SetTarget currently sets the target clip to the base clip if the
target passed to tellTarget() is an undefined object. This causes
goto's to run on the base clip in Ruffle, when Adobe Flash Player
does not run the goto's at all.
Fixes#12389 and #12390