• EmitSound() on player glitches / repeats at the end of the sound.
    10 replies, posted
In the addon I'm working on, when a player chooses a taunt from the menu, a request is set to the server with the path to the sound file to play. The server recieves this path and calls ply:EmitSound(soundPath, 100), which triggers the sound to emit from the player, playing for all clients. The problem is, the sound seems to be glitching at the end of the sound. It plays the whole sound but then repeats the last half-second or so of audio from the file again. Here is where EmitSound is called: SimpleTauntMenu/sv_stm_main.lua at 24869ab9cc1c9b201449b7f7cf7b6.. It seems to happen with some sounds but not others. Been throwing my head at it for hours and thought I'd see if any of you have ideas.
It seems like there might be two copies of the sound file somehow? Still investigating...
Make sure that net is called once
Make sure that net is called once Verified. It is only called once each time the user selects a taunt to play. I've also discovered the issue happens when the client types "play <soundpath>" into their console. So this must be something about the sound files themselves or where they are being retrieved from? I force clients to download DN PropHunt Taunt Pack by putting resource.AddWorkshop("426548393") into lua/autorun/server/workshop.lua, which is where the problem sound are. If one of you has the time and is willing, could you download this taunt pack and type play taunts/dreamnetwork/props/dn0038.ogg? Other taunts I've found to duplicate the end: taunts/dreamnetwork/props/ih0022.mp3 taunts/dreamnetwork/props/dn0041.ogg taunts/dreamnetwork/props/dn003E.ogg taunts/dreamnetwork/props/dn003D.ogg
Can I download the sound?
Can I download the sound? You should be able to add resource.AddWorkshop("426548393") into lua/autorun/server/workshop.lua or just subscribe to DN PropHunt Taunt Pack or here's a direct link to the sound files: dn_prophunt_taunt_pack_426548393.zip
Which sounds actually used in your function?
Which sounds actually used in your function? Pretty much all of them are. But the ones I've found to be a problem are taunts/dreamnetwork/props/dn0038.ogg taunts/dreamnetwork/props/ih0022.mp3 taunts/dreamnetwork/props/dn0041.ogg taunts/dreamnetwork/props/dn003E.ogg taunts/dreamnetwork/props/dn003D.ogg Among others I'm sure, it seems about a third of the sounds give me the glitched end. Playing the sound files directly on Windows they seem fine. Just through Garry's mod it's duplicating the last half-second of the sound.
Submitted a GitHub issue here: https://github.com/serverkomplex/gmod-tauntpack/issues/2
ih0022.mp3 -- has bad cut and repeated fragment https://files.facepunch.com/forum/upload/104786/5f6238ca-7098-4e03-9c18-c8ae51106788/audacity_2019-01-12_00-55-59.png dn0041.ogg -- have same habit https://files.facepunch.com/forum/upload/104786/0910faa4-feef-4cea-ad7a-4a20afba267f/audacity_2019-01-12_01-13-48.png dn0038.ogg -- have repeated tail https://files.facepunch.com/forum/upload/104786/da269f71-b575-42c6-bb04-20b16b6e5393/audacity_2019-01-12_01-15-46.png dn003e.ogg -- same tail https://files.facepunch.com/forum/upload/104786/3759e730-333d-4d07-bbf5-348884bb85f7/audacity_2019-01-12_01-16-50.png dn003d.ogg -- same tail https://files.facepunch.com/forum/upload/104786/e579aacf-dc05-4852-a007-f0670000f2bb/audacity_2019-01-12_01-17-56.png
That's what I noticed with dn0038.ogg as well. Thanks for checking the others. It seems uploading to the workshop in 2015 corrupted the audio files: See https://github.com/serverkomplex/gmod-tauntpack/issues/2 From my own tests, downloading the repo and uploading my own test version fixed the issue. I suggested the author do a re-upload.
Sorry, you need to Log In to post a reply to this thread.