[1.12.1] Sound in background menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Hareturtle's Avatar Member
    Reputation
    8
    Join Date
    Nov 2015
    Posts
    9
    Thanks G/R
    2/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [1.12.1] Sound in background

    The 1.12.1 client doesn't play sound in background and lacks the option to allow this, which kinda sucks. I've searched far and wide and found no pre-existing solutions, so I set out to work out my own. I'm not particularly good at game hacking and haven't done any real WoW hacking before, so I'm not 100% sure what I'm doing here :P

    WoW uses FMod for sound, and within FMod.dll the most relevant function looked like _FSOUND_SetMute. I set some breakpoints and quickly found a function at 0x007a4860 that seems to get called every time the game window loses and gains focus, and mutes and unmutes sound accordingly, as well as changes a global to reflect the status. My best guess is that this is an event handler function for a window focus event.

    It was then trivial to change this function so that it does not mute sound when the window loses focus. The way I did this was to change offset 0x007a4868 from JZ 14 to JZ 27 so that the code that marks the window as inactive and mutes the sound is skipped. This does have the side effect of making the global always think the client is in focus, but from what I can tell it seems to only be used by FSound-related code so this is probably alright. With this change the client appears to happily play sound in the background.

    Would greatly appreciate it if someone who knows more about this could check my work, because I'm a little clueless when it comes to this stuff.

    [1.12.1] Sound in background
  2. Thanks Corthezz (1 members gave Thanks to Hareturtle for this useful post)
  3. #2
    scimmy's Avatar Active Member
    Reputation
    52
    Join Date
    Jul 2020
    Posts
    54
    Thanks G/R
    1/33
    Trade Feedback
    0 (0%)
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Hareturtle View Post
    The 1.12.1 client doesn't play sound in background and lacks the option to allow this, which kinda sucks. I've searched far and wide and found no pre-existing solutions, so I set out to work out my own. I'm not particularly good at game hacking and haven't done any real WoW hacking before, so I'm not 100% sure what I'm doing here :P

    WoW uses FMod for sound, and within FMod.dll the most relevant function looked like _FSOUND_SetMute. I set some breakpoints and quickly found a function at 0x007a4860 that seems to get called every time the game window loses and gains focus, and mutes and unmutes sound accordingly, as well as changes a global to reflect the status. My best guess is that this is an event handler function for a window focus event.

    It was then trivial to change this function so that it does not mute sound when the window loses focus. The way I did this was to change offset 0x007a4868 from JZ 14 to JZ 27 so that the code that marks the window as inactive and mutes the sound is skipped. This does have the side effect of making the global always think the client is in focus, but from what I can tell it seems to only be used by FSound-related code so this is probably alright. With this change the client appears to happily play sound in the background.

    Would greatly appreciate it if someone who knows more about this could check my work, because I'm a little clueless when it comes to this stuff.
    You could just NOP out all calls to FSOUND_SetMute instead and the internal state machine that manages whether or not the window is active will still work properly.

  4. #3
    Hareturtle's Avatar Member
    Reputation
    8
    Join Date
    Nov 2015
    Posts
    9
    Thanks G/R
    2/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I figured there may be legitimate calls to it, but looks like there aren't (stuff like the "Enable Music" checkboxes in the options do not appear to call the function). Either way, looks like that particular variable is only used by functions that check it before calling SetMute, so functionally there's probably no difference in disabling it like this and NOPing out all calls to SetMute.

  5. #4
    oiramario's Avatar Established Member
    Reputation
    85
    Join Date
    Mar 2021
    Posts
    133
    Thanks G/R
    36/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow.exe -nosound

  6. #5
    Hareturtle's Avatar Member
    Reputation
    8
    Join Date
    Nov 2015
    Posts
    9
    Thanks G/R
    2/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by oiramario View Post
    wow.exe -nosound
    It seems that flag disables sound initialization altogether rather than messing with SetMute.

Similar Threads

  1. Record sound in High Quality
    By 1337person in forum Programming
    Replies: 2
    Last Post: 02-16-2009, 08:52 PM
  2. how do i play sounds in chat channels?
    By leprakawn in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 08-29-2008, 04:25 AM
  3. Sending keystrokes to AoC window in background
    By Ghazban in forum Age of Conan Exploits|Hacks
    Replies: 1
    Last Post: 07-01-2008, 04:18 AM
  4. Play every sound in WoW!
    By Dartex in forum World of Warcraft Exploits
    Replies: 12
    Last Post: 08-10-2007, 09:39 AM
  5. Hear all the Sounds in game
    By RazorGator in forum World of Warcraft Exploits
    Replies: 21
    Last Post: 04-21-2007, 12:33 PM
All times are GMT -5. The time now is 07:23 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search