Huge lag with soundscapes

Discussion in 'Mapping Questions & Discussion' started by The_Gl!tch.exe, Oct 13, 2018.

  1. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
    There are 4 different areas in the same room in my custom map (you can imagine it as 4 rooms next to each other connected with doors).
    These soundscapes are controlled by trigger_soundscapes and for each soundscape there is a trigger_soundscape covering the entire room.
    However when entering after previously activating a completely different soundscape, it causes a huge lag.
    Is there a way to avoid these lags?
     
  2. ics

    aa ics http://ics-base.net

    Messages:
    814
    Positive Ratings:
    514
    Do you have more than 2 soundscapes overlapping eachothers? Are they using game default soundscapes or some custom edited?
     
  3. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
    All soundscapes used are custom ones.
    I've also replaced every soundscape_triggerable with normal soundscapes.
    However I believe it's the audio which causes the lag when activating it when having another soundscape already active.

    It's about this music:
    View: https://www.youtube.com/watch?v=5Rq6w_K1K3E

    I've downloaded it as a .wav-file with "Free YouTube to MP3 Converter" (original quality) and I've also set a beginning and end mark.
    Here's what the soundscape script for this music looks like:


    "Am2r.Surface"
    {
    "playlooping"
    {
    "wave" "glitchexe/am2r_surface.wav"
    "volume" "1"
    "pitch" "100"
    }
    }



    btw. the soundscapes are not overlapping
     
  4. AliDances

    AliDances L1: Registered

    Messages:
    11
    Positive Ratings:
    2
    So even when you are entering the radius of another normal soundscape you get lag? Or is it only with the trigger volumes?
     
  5. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
    It's with both. However I only use normal soundscapes now, which activate when entering their radius.
    It's the custom am2r-music which causes the lag and I don't know the reason why.
    There is only one other custom soundscape which works perfectly together with the am2r-version, but with all the others it causes a lag.
     
  6. henke37

    aa henke37

    Messages:
    2,059
    Positive Ratings:
    501
    Perhaps you should use only one soundscape, but give it multiple points to emit sound from?
     
  7. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
    The rooms have multiple entrances and each one has the same soundscape. The minimum of that one music is 3 soundscapes and they're not overlapping each other. When entering the radius, the players should have "eye contact" with the soundscape to let it play (that's why I have 3 of them due to walls)
    Emission is not the problem, it's the activation.
     
    Last edited: Oct 15, 2018
  8. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
  9. Tumby

    aa Tumby

    Messages:
    1,034
    Positive Ratings:
    1,063
    Are you using any soundscape proxies? https://developer.valvesoftware.com/wiki/Env_soundscape_proxy
    If you don't know what they are: They basically extend the influence of an existing soundscape entity. If you need to cover all doors of a room with the same soundscape, use proxies so the game doesn't reload the files.
     
  10. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
    Thanks for the advice. However, even though I've replaced two of them with soundscape proxies referring to the normal one (and it works), the lag still exists. It's probably something else causing it.
     
  11. Tumby

    aa Tumby

    Messages:
    1,034
    Positive Ratings:
    1,063
    Did you change the wav file at any point? Delete any sound.cache files you can find as they don't update.
    How big is the wav file? Maybe it's so big the sound system has trouble handling it. It's possible to add cue points to an mp3 so look into that.
    Did you make sure the wav is in the right format? Maybe the engine has trouble reading it. Double check that the format is absolutely correct.
     
  12. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
    I've tried it with deleting all the sound.cache files. I've also renamed the soundscape because I thought it's because of the number in its name.
    However, everything is still the same like before. The lag still exists.
    (The wav file has markers and is 03.50 minutes long (39.681 KB) )
     
  13. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
    I found out that the music was just a little bit too long. I've reduced it by cutting out the "unneccessary" parts of the music and now it works perfectly.
    The music is now less than 3:10 minutes long and the lag is gone.
     
  14. henke37

    aa henke37

    Messages:
    2,059
    Positive Ratings:
    501
    If that is the case then perhaps you should consider making the sound stream. Normally the engine loads in the entire sound at once at the start of playback.

    To do this you will need to make a custom sound script in addition to the soundscape.
     
    Last edited: Oct 19, 2018
  15. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
    The soundscapes work but when testing the map with sv_pure 2 they're completely silent.
    I have a soundscapes_manifest.txt file refering to the soundscapes_<mapname>.txt file which contains all the soundscapes.

    I don't know what to put into the scripts/game_sounds_manifest.txt and maps/<mapname>_level_sounds.txt file.
     
  16. Narpas

    aa Narpas Takes way to long to make and update maps

    Messages:
    428
    Positive Ratings:
    409
    Have you packed your sounds using CompilePal, Pakrat, or VIDE? You needed to pack in custom content in order for it to work with sv_pure and for other people to see/hear it
     
  17. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    92
    Positive Ratings:
    1
    I usually pack with VIDE.
    However I've noticed it only detects the scripts/soundscapes_<mapname>.txt file. The wavs and the scripts/soundscapes_manifest.txt file don't get packed

    Do I have to add them manually or do I need the scripts/game_sounds_manifest.txt and maps/<mapname>_level_sounds.txt in order to let them being packed (If yes, what should I write in them?)
    I'm a bit confused with this