---- INITIALISATION CHECK ----

if not (Monkey_Utils:IsSingleplayer() or isServer() or isCoopHost()) then
    return;
end

---- PUBLIC FUNCTIONS ----
local VOLUME_MULTIPLIER = 0.5;

local SilentHillRadioSoundPlayer = {};
local staticSound;

function SilentHillRadioSoundPlayer:LoadRadioStatic(vol)
	if(not staticSound or not staticSound:isPlaying()) then
		staticSound = getSoundManager():PlaySound('heartbeat', true,0);
		staticSound:setVolume(vol * VOLUME_MULTIPLIER);
	end
end

function SilentHillRadioSoundPlayer:SetStaticVolume(vol)
	SilentHillRadioSoundPlayer:LoadRadioStatic(vol);
	staticSound:setVolume(vol * VOLUME_MULTIPLIER);
end

return SilentHillRadioSoundPlayer;