Skip to content

Audio Refactor 1

Zerken requested to merge Zerken/2009-scape-zerken:audio-refactor-1 into master

What have you done in this MR?

  • 1st of many audio refactors. The end goal is removing AudioManager.java and using contentAPI playAudio and playGlobalAudio functions for all sounds:
    • Removed getAudio and playAudio function that uses Audio class from content API and refactored its uses to use the proper ContentAPI function.

Refactored playAudio:

  • playAudio will no longer be used for global sounds and refactored all its uses for global sounds to use contentAPI function playGlobalSound.
  • Re-ordered parameters and renamed volume to loops as it controls sound looping for certain ids and not the "volume"

Refactored playGlobalAudio:

  • Re-ordered parameters and renamed volume to loops as it controls sound looping for certain ids and not the "volume"

Refactored the following sounds: This will have no effect on the functionality of the sounds unless otherwise stated below in parenthesis.

Testing note: Primarily the sounds that really need to be tested are the ones with changes noted in parenthesis. The rest are technical changes that will have no effect on the functionality of the sound. Feel free to test them all, but it's not really necessary. I noted what was refactored for tracking purposes.

  • All the special attack and DFS sounds on !1475 (merged) (special attack sounds defaulting to new API radius of 8 instead of 5)
  • DropListener.kt : Dropping coins, item, and destroying object sounds (destroy object sound changed to correct id)
  • Ectophial refill sound
  • Agility pyramid sounds
  • Emptying a fishbowl
  • Enchanted jewellery teleport sound
  • Enchanted jewellery enchant tab sound
  • All the sounds for Elemental Workshop 1 listeners
  • The sound when getting experience from a lamp
  • GraveController.kt : Blessing and repairing a grave
  • Hunter pitfall sounds
  • Hunter sound when catching a kebbit with a noose
  • Lunar cure me and cure group spell sound
  • High and low alchemy spell
  • Silver crafting at a furnace
  • Spinning at a spinning wheel
  • Drinking from a waterskin in the desert
  • Sound when being blessed by drezel in nature's spirit quest at stage 35
  • Sound when poison immunity has 30 seconds left and when your immunity expires
  • Shearing regular sheep and the penguin sheep at lumbridge
  • Sound when regular spell book charge spell expires
  • GE sounds: making 0 coin offer when buying, not having enough money, placing a buy offer, not enough room in inventory
  • Sound when filling vessels from a water source
  • Spell sounds: Regular and ancient combat spells. Teleblock spell.

From !1486 (merged) comment:

  • Fixed lunar teleport sounds so they don't play when you are teleblocked

Are there any tricky things testers should keep an eye out for?

  • No
  • Yes, as follows:
  • I have tested these changes thoroughly.
  • This requires extra testing due to changes to architecture or other similarly risky changes.
  • I used the Thanos Tool for any JSON edits where possible, and have attached screenshots of any changes.
  • I acknowledge that this contribution will be released under the AGPL license.

*** NOTE: If Gitlab complains about pipelines stating that you need to "Validate your Gitlab account" there is no need to worry. You do not have to do this and it is only occurring because OUR pipeline tried to run on your fork. While it's preferred that you do validate your account, you can safely ignore/dismiss this message from Gitlab. ***

Merge request reports