function wdj.GetMaster(channel, ignoredEnt)
	for _,e in pairs(wdj.DJ_Controllers) do
		if e:GetChannel() == channel and e != ignoredEnt then return e end
	end
end

function wdj.GetAudioSources(channel)
	local s = {}
	for _,e in pairs(wdj.DJ_AudioSources) do
		if e.IsAudioSourceEnabled and e:IsAudioSourceEnabled() and (!channel or channel == e:GetChannel()) then
			s[#s+1] = e
		end
	end
	return s
end

function wdj.signum(x)
	if x > 0 then return 1 end
	if x < 0 then return -1 end
	return 0
end