using Bass.dll

Is it possible to use Bass.dll within garrysmod? and if so how would I interact with it?

http://gmodmodules.googlecode.com/svn/trunk/gm_bass/

I’ve been using it a lot recently so I’ll try and give you a list of methods and what they do in a few minutes.

Loading a song from a site.
[lua]local RADIO = {}
RADIO.Channel = nil

BASS.StreamFileURL( “http://www.somesite.com/somesong.mp3orwhatever”, 0, function( basschannel, error ) – Start our stream

if !basschannel then

	if error == 40 or error == 2 then
		print( "Radio Timedout" )
	elseif error == 41 then
		print( "Unsupported Format" )
	elseif error == 8 then
		print( "Radio BASS Init Error" )
	else
		print( "Error: " .. tostring( error ) )
	end
	
	return
	
end

RADIO.Channel = basschannel
RADIO.Channel:set3dposition( vector_origin, vector_origin, vector_origin )
RADIO.Channel:play( self.PlayFromStart )

end )

hook.Add( “Think”, “Radio:ThinkAndUpdate”, function()

if RADIO.Channel then

	local me = LocalPlayer()

	local MyPos = me:EyePos()
	MyPos.z = -MyPos.z
	
	local eyeangles = me:GetAimVector():Angle()

	// threshold, 89 exact is backwards accord to BASS
	eyeangles.p = math.Clamp( eyeangles.p, -89, 88.9 )
	
	local forward = eyeangles:Forward()
	local up = eyeangles:Up() * -1
	
	BASS.SetPosition( MyPos, vector_origin, forward, up ) -- Manages to keep the stream alive..
	RADIO.Channel:set3dposition( MyPos, MyPos, MyPos ) -- Manages to keep the stream alive..
	RADIO.Channel:setvolume( 0.50 ) --Can check a cvar if you want
	
end

end )[/lua]

Some more info on the methods and what they do…

http://www.facepunch.com/showthread.php?p=15867282#post15867282