Commit Graph

719 Commits

Author SHA1 Message Date
Kornelius Rohrschneider 53ba75d587 Move logarithmic volume transformation to AudioMixer
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).
2023-09-07 00:51:58 +02:00
Kornelius Rohrschneider a550a998c3 desktop: Add desktop volume controls
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.
2023-09-07 00:51:58 +02:00
renovate[bot] dabc2d56b9 fix(deps): update rust dependencies 2023-09-04 10:25:24 +02:00
Crowdin Bot 2996f97578 chore: Update translations from Crowdin 2023-09-02 15:43:08 +02:00
renovate[bot] 4e75c3890a fix(deps): update rust dependencies 2023-08-28 07:39:35 +02:00
Crowdin Bot 3ccda582e1 chore: Update translations from Crowdin 2023-08-25 11:50:24 +02:00
David Wendt 7158039135 audio: Audio streamed from FLVs do not have the SWF MP3 header 2023-08-23 15:36:20 -06:00
renovate[bot] 2f4c7d2fe3 fix(deps): update rust dependencies 2023-08-21 08:59:07 +02:00
renovate[bot] 1f4bfcf10d fix(deps): update rust dependencies 2023-08-18 23:32:15 +02:00
Crowdin Bot 96faa8c5ce chore: Update translations from Crowdin 2023-08-18 00:54:46 +02:00
Crowdin Bot 56b97e7b40 chore: Update translations from Crowdin 2023-08-13 20:04:29 +02:00
Crowdin Bot 8e1632ab22 chore: Update translations from Crowdin 2023-08-11 10:23:54 +02:00
Crowdin Bot 205ef09cc6 chore: Update translations from Crowdin 2023-08-08 23:49:31 +02:00
renovate[bot] a4b179e1e0 chore(deps): lock file maintenance rust dependencies 2023-08-08 23:19:16 +02:00
sleepycatcoding ba5eb9532b desktop: Fix --no-gui issues 2023-08-08 18:25:45 +02:00
Daniel Jacobs dbb5e381f2 core/desktop/web: Play unsupported videos with browser 2023-08-07 14:31:33 -06:00
Lord-McSweeney 66df964709 desktop: Don't wrap context menu item text; support enabled/disabled ctx menu items 2023-08-05 22:06:10 +02:00
Crowdin Bot 98c286e997 chore: Update translations from Crowdin 2023-08-04 17:18:58 +02:00
sleepycatcoding ad5f087baa desktop: Add --no-gui flag 2023-08-02 22:34:25 +02:00
sleepycatcoding d7b6e588d0 desktop: Use new socket API 2023-07-31 22:32:03 +02:00
Crowdin Bot 739583c35c chore: Update translations from Crowdin 2023-07-30 23:36:20 +02:00
Crowdin Bot 64b705a8c5 chore: Update translations from Crowdin 2023-07-30 16:33:54 +02:00
Crowdin Bot 82b88ebff5 chore: Update translations from Crowdin 2023-07-29 00:11:13 +02:00
Crowdin Bot 2455a5f1b7 chore: Update translations from Crowdin 2023-07-28 19:47:33 +02:00
Crowdin Bot 280de7cd61 chore: Update translations from Crowdin 2023-07-27 16:39:17 +02:00
Nathan Adams 55906c22fa desktop: Change 'socket mode' text to 'TCP Connections' 2023-07-26 19:44:39 +02:00
Nathan Adams 1a0a82d898 core: Move fscommand execution outside of ExternalInterfaceProvider, so it can be implemented without causing ExternalInterface.available to become true 2023-07-26 17:00:15 +02:00
renovate[bot] 3e63a88c34 chore(deps): lock file maintenance rust dependencies 2023-07-25 08:23:28 +03:00
sleepycatcoding a432b1cbca desktop: Split read/write tasks for TcpStream
This should improve latency as we no longer wait for writing.
2023-07-23 09:13:01 +02:00
sleepycatcoding 4db16b76ab Chore: fmt 2023-07-23 09:13:01 +02:00
sleepycatcoding a82658687e desktop: Update en-US translation file 2023-07-23 09:13:01 +02:00
sleepycatcoding 74b66fdd73 core+desktop: Rename SocketBehavior to SocketMode
Also change command line flag from --socket to --socket-mode
2023-07-23 09:13:01 +02:00
sleepycatcoding d7421a9812 desktop: Default socket behavior to ask 2023-07-23 09:13:01 +02:00
sleepycatcoding 7cb6998991 chore: fmt 2023-07-23 09:13:01 +02:00
sleepycatcoding 4c6ce79210 desktop: Differentiate between TimedOut and Failed connection 2023-07-23 09:13:01 +02:00
sleepycatcoding caddd5512b desktop: remove Option for connection timeout 2023-07-23 09:13:01 +02:00
sleepycatcoding 4501bc19c4 chore: allow clippy::too_many_arguments 2023-07-23 09:13:01 +02:00
sleepycatcoding b46cc2aadc desktop: remove unneeded comment 2023-07-23 09:13:01 +02:00
sleepycatcoding c0ebafdb95 desktop: Use provided timeout when connecting 2023-07-23 09:13:01 +02:00
sleepycatcoding df4ee7fe05 Chore: Fmt 2023-07-23 09:13:01 +02:00
sleepycatcoding 2bcfc25b9f desktop: Add socket behavior to OpenDialog 2023-07-23 09:13:01 +02:00
sleepycatcoding 22eb150756 desktop: add SocketBehavior and host whitelist
This adds a way to modify socket behavior to restrict, ask, or allow all
connections. Also adds a whitelist which can be used to allow specific hosts
without enabiling ask or allow all behaviors.
2023-07-23 09:13:01 +02:00
sleepycatcoding 41a63e3bef desktop: make socket connections async
This also fixes an unrelated bug where null bytes were added to data, this
broke data parsing.
2023-07-23 09:13:01 +02:00
sleepycatcoding 8f6aab56e0 desktop: correct TcpStream reading
This was incorrect as this pr was initially based on #8188.
Old code was searching for XML payload end null bytes, now it just reads
and appends bytes.
2023-07-23 09:13:01 +02:00
sleepycatcoding 8c221653ff desktop: Implement connect_socket 2023-07-23 09:13:01 +02:00
Nathan Adams 586c3bebf6 core: Remove unsupported content warning 2023-07-22 23:08:42 +02:00
Aaron Hill c19fc1b72c desktop: Set max_execution_duration to Infinity by default
The `max_execution_duration` feature is pretty much useless on desktop,
and breaks slow SWFs by aborting script execution instead of letting
it continue.
2023-07-20 16:25:49 -04:00
Crowdin Bot b2afcbaf3e chore: Update translations from Crowdin 2023-07-20 13:41:04 +02:00
Nathan Adams 2729da8ec0 desktop: Send wgpu stats to tracy 2023-07-19 21:36:30 +02:00
Nathan Adams 5597535471 wgpu: Store wgpu::Instance in Descriptors 2023-07-19 21:36:30 +02:00