For some reason sound.PlayURL with the 3d option no longer works for channels that used to. Disabling the 3d option allows the stream to start, however when adding it back I get error 41 (BASS_ERROR_UNKNOWN), which doesn’t even match with it’s error id… as seen here: http://www.bass.radio42.com/help/html/78effdb0-70b5-1602-a234-b0847b4e6d6c.htm
This is my code
[lua]local function StartRadio( Entity, Table, Station )
if not IsValid( Entity ) or not Table or not Station then return end
if not GAMEMODE.RadioStations[ Station ] then StreamTable[ Entity ] = nil return end
Table.Station = Station
sound.PlayURL( GAMEMODE.RadioStations[ Station ][2], "3d noplay", function( SoundChannel, ErrorID, ErrorName )
if IsValid( SoundChannel ) then
if not IsValid( Entity ) or not StreamTable[ Entity ] then
SoundChannel:Stop()
SoundChannel = nil
return
end
if Station == StreamTable[ Entity ].Station then
Table.Stream = SoundChannel
SoundChannel:SetPos( Entity:GetPos() )
SoundChannel:Play()
else
SoundChannel:Stop()
SoundChannel = nil
end
else
StreamTable[ Entity ] = nil
PrintTable(GAMEMODE.RadioStations[ Station ])
chat.AddText( Color( 255, 0, 0, 255 ), "Radio errored, station is dead: " .. ErrorID .. " " .. ErrorName )
end
end )
end[/lua]
Has an update broken sound.PlayURL 3d feature?
[editline]29th November 2015[/editline]
I narrowed it down a bit, it seems sound.PlayURL (bass incorporated into gmod) does not support AAC codec format. Seems it needs the BASS_AAC extention.