terrible sound issues (dropouts, crackling)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Qlara
Regular
Posts: 80
Joined: Fri Nov 28, 2014 10:22 am
Completed: Carmilla
Skype: kantonija
itch: visualgothic
Location: Berlin
Contact:

terrible sound issues (dropouts, crackling)

#1 Post by Qlara » Wed Apr 04, 2018 10:12 am

At various places throughout my game, my speakers seem to breathe their last. Terribly noisy crackling sounds.
However, I was informed that these are so called dropouts and not my speakers.
I tried various systems, compiled, non-compiled, changed file types around like hell, nothing worked.
Could my messing with the volume sliders (and other badly-informed alterations) be causing the issues?
Here's what I did:
In options.rpy I added a channel and tried(!) combining music- and sound sliders:

Code: Select all

    renpy.music.register_channel("heartbeat", "sfx", False)
init:
    python:
        def allvols(x):
            _preferences.set_volume("sfx", x)
            _preferences.set_volume("music", x)
        allvolsad = ui.adjustment(range = 1.0, value = 1.0, changed=allvols)

In screens.rpy under preferences I deleted volume sliders and added:

Code: Select all

                label _("Volume") 
                hbox:
                    text _(" low to high")
                bar value 1.0 range 1.0 adjustment allvolsad style "slider_slider" 
The slider does what it is supposed to.
Here's an excerpt from my script that is guaranteed to go wrong:

Code: Select all

    play music "sounds/graveyard.mp3" loop   
scene bg graveyard
    show gravedigga:
        zoom 1.6
        xpos -0.4
        ypos -.6
        linear 3.0 zoom 1.0 xpos 0.0 ypos 0.0
    show kegelegrave:
        alpha .8
    #$ renpy.music.set_volume(1.0, 0.0, channel='sound') # added this in case rollback was messing with the channel
    #$ renpy.music.set_volume(1.0, 0.0, channel='heartbeat') # but it didn't help
    $ renpy.music.set_volume(0.7, 0.0, channel='sound') 
    $ renpy.music.set_volume(0.3, 0.0, channel='heartbeat') 
    play heartbeat "sounds/heartbeat.wav" loop
    play sound "sounds/digging.wav" loop
    show smportr a with slowdissolve     
    renpy.music.set_volume(0.1, 15.0, channel='sound') 
    renpy.music.set_volume(.7, 15.0, channel='heartbeat') 
scene bg gravediggared 
    show gravedigga behind black:
        alpha .5
        linear 1 alpha 0.0
    stop sound
    $ renpy.music.set_volume(1.0, 0.0, channel='sound') # reset sound channel volume
    $ renpy.music.set_volume(0.0, 0.0, channel='music')  
    show cracking behind blood0
    pause .1
    hide cracking
    play sound "sounds/bloodsplatter.wav"
    hide blood0
    show bloodsplatter:
        zoom 1.2
    pause .1
    play sound "sounds/bloodsplatter.wav"
    pause 1.0
    $ renpy.music.set_volume(1.0, 0.0, channel='music')
    stop heartbeat 
    $ renpy.music.set_volume(1.0, 0.0, channel='heartbeat')
I really need some help here, as I've already spent weeks trying to figure it out without getting anywhere.

User avatar
Qlara
Regular
Posts: 80
Joined: Fri Nov 28, 2014 10:22 am
Completed: Carmilla
Skype: kantonija
itch: visualgothic
Location: Berlin
Contact:

Re: terrible sound issues (dropouts, crackling)

#2 Post by Qlara » Wed Apr 04, 2018 11:49 pm

I finally found the source of this problem.
The problem happens when I access a scene via load button. Apparently not everything is refreshed properly. At least I can avoid now.

Post Reply

Who is online

Users browsing this forum: _ticlock_