Open thegrb93 opened 9 years ago
So it's not my fault that I see that for many clients :/
It isn't consistent for me though, sometimes it works, sometimes it doesn't (I'm using a audio stream instead of a file, so I thought it had to do something with the connection :/)
Maybe I should try it with non-3D to see if it's really because of that on my end...
The problem is that BASS doesn't like auto looping *.wav sounds, if you try non looping ones they will work fine. I think it has something to do with the cues inside them. If you open them with a wav editor, you will see them.
But I'm not using looping at all in the code I posted. Are you saying that looping wavs don't work with non-looping sound plays?
sound/ambient/forest_day.wav
IS a looping sound file, it contains markers for looping:
(notice the M0 and M1)
The problem might be that it uses markers instead of loop points.
There was an update of BASS where they changed something about *.wav files, along with other fixes. Maybe updating to the new version helps with this issue.
Same here. No loops or something. sound.PlayFile from "data" without "3d" flag is successfully. When adding flag "3d" sound doesn't play. Playing same file in sound.PlayURL with flag "3d" works perfectly.
Gabe Newell will be proud!
The issue seems to be still present, but a bit changed. For self looping *.wav files it will always return error code 2, even without the "3d" flag.
According to the change log of BASS the newest version fixes those problems with cues in the sound file. (https://github.com/Facepunch/garrysmod-requests/issues/1071)
Was this fixed? The original file plays fine on my client now.
I lied, it seems to still be failing but in a different way. It now prints nil 0 BASS_OK
which is from failing to create the mixer channel internally.
Seems to work for me
sound.PlayFile("sound/npc/turret_floor/ping.wav", "3d noblock noplay", function(chan)
chan:EnableLooping(true)
chan:SetPos(self:GetPos())
chan:Play()
self.bruh = chan
end)
x86-64, 64-bit gmod
3D fade works too
I'm not sure if it's related to yesterday's new update but with Billy's example, the sound seems to repeat for a minute but then stops.. however using the EmitSound* functions it repeats indefinitely like normally. I'm dumb.
Nothing about BASS was changed.
If you mean @WilliamVenner s example, you need to keep a reference to the object for it to play infinitely, as mentioned in the example on the wiki:
https://wiki.facepunch.com/gmod/sound.PlayURL
You can't just comment out self.bruh = chan
(Also that sound is the most obnoxious thing ever for testing)