DRSSound Fix

Apps DRSSound Fix 3.0

Login or Register an account to download this content
Hey, I tried installing DRSSoundfix 3.0 but AC crashes everytime I drive over the DRS start line. I tried installing it with the content manager and manually, without any change. I reinstalled the game already. I also tried V 1.0, it doesn't crash but I can't hear anything. Someone got the same problem or maybe a solution?
 
Thanks to @unoreverse. This is what I put into DRSSound.py in order to fix the micro-stutters.

Code:
import threading

[...]

# Function to run playsound using a different thread
def threaded_sound(sound_path):
    thread = threading.Thread(target=playsound, args=(sound_path,), daemon=True)
    thread.start()

# Runs every frame
def acUpdate(deltaT):
    [...]

    # Check what to do while in DRS zone

    if drsAvailable:
        # Play the DRS Available sound if we have not yet
        if not drs_available_sound_played:
            #playsound(available_temp_path, block = False)
            threaded_sound(available_temp_path)
            drs_available_sound_played = True

        # Play the DRS Enabled sound if we have not yet
        if drsEnabled and not drs_enabled_sound_played:
            #playsound(enabled_temp_path, block = False)
            threaded_sound(enabled_temp_path)
            drs_enabled_sound_played = True

        # Reset the DRS Enabled flag if DRS has been disabled within the DRS Zone
        if not drsEnabled and drs_enabled_sound_played:
            #playsound(enabled_temp_path, block = False)
            threaded_sound(enabled_temp_path)
            drs_enabled_sound_played = False

        if not drsEnabled:
            drs_enabled_sound_played = False

    [...]

If you're having trouble, make sure the temp_files folder is in `apps/python/DRSSound` (empty folders don't get hardlinked if you use the mods folder). Make sure DRSSound is enabled in Settings > Assetto Corsa > Python Apps. In game, use the Python Debug app to see if it catches any errors.

There seems to be an issue where no sound plays if you set one of the sounds to 0 in settings.ini, so just download a silence.wav from here or wherever and replace whichever sound you want to silence in settings.ini with the path to the silent audio file.

These are my settings. I've silenced the available sound since I have another app for that (CMRT Complete HUD).

[VOLUME]
VOLUME=150
VOLUME_AVAILABLE=100
VOLUME_ENABLED=100

[CUSTOM SOUNDS]
AVAILABLE_SOUND=apps/python/DRSSound/silence.wav
ENABLED_SOUND=apps/python/DRSSound/enabled.wav
 
Last edited:
Back
Top