Vurv78 / WebAudio

A safe, efficient and powerful replacement for Streamcore that adds playing & manipulating URL streams through IGmodAudioChannel/BASS
https://steamcommunity.com/sharedfiles/filedetails/?id=2466875474
MIT License
18 stars 3 forks source link

Works for some, but not for all. #58

Closed thezcar closed 10 months ago

thezcar commented 1 year ago

I'm a part of the Garry's Mod server "Freebuild and Kill," and we've been having an issue as of lately that might be related to WebAudio. One of our members made this "YouTube Player" that uses WebAudio functions, and they made it public for everyone on the server to use. How it would work is: you place the chip down, type a prefix followed by the URL or video name, and the name of said video would show in chat and in console. For the past couple weeks, we've been having an issue with these players. People could queue a song, and it'll show in console and in chat, but not everyone hears it. Some people do, some people don't. When I try and queue a song with my own player, again, it shows in chat and in console, but I can't hear it, and neither can others. But we all the same exact player. Instead, it gives this error: [WA]: Error when creating WebAudio receiver with id 4, Error [BASS_ERROR_TIMEOUT] Our custom Youtube Core addon doesn't seem to be issue, and all we can think of is that its WebAudio. I have no clue if this is happening around other servers who use WebAudio or what, and I'm not super educated in Expression 2, but just thought I'd get something out there.

Thanks for reading this,

thezcar

Vurv78 commented 1 year ago

That's an internal error from BASS, which garrysmod uses for IGmodAudioChannel (which webaudio uses)

http://www.bass.radio42.com/help/html/78effdb0-70b5-1602-a234-b0847b4e6d6c.htm According to this page, as the name already said, the connection is timing out.

Does this youtube api synchronously have to download a video and respond with it? If so likely that's the issue, as if bass waits (5 seconds default from what I see on other pages), and the page has yet to respond, it will fail.

Unfortunately all I can see that can be done is if the api they are using caches the sound requests, so the E2 creator could use httpRequest to first tell the server to start downloading the video, and then try playing the sound for other players. I know from personal experience a youtube download/sound hosting api will be very slow, since you first need to download it from youtube, and then convert it to mp3.. this is just my best guess though