Listening closely while inside, I can actually hear the volume of the stream source lowering when I play the sound effect as well which is strange? it shouldn't do that?
Here's what my code looks like:
Code: Select all
-- within sfx.lua file which is required at init
love.audio.setEffect( "reverb", {type="reverb",decaytime=0.5,roomrolloff=0,density=0.8} )
-- -- --
set_test = love.audio.newSource( "sfx/test.wav", 'static' )
sfx_soundscape = love.audio.newSource( "music/soundscape.wav", 'stream' )
-- updated within main update loop
function updateSoundscape()
local tvolume = 0
local volume = Settings.Audio.Volume/2
local effect = false
if _currentRoom == "outside" then
tvolume = volume/4
else
tvolume = volume/12
effect = true
end
sfx_soundscape:setEffect( "reverb", effect )
sfx_soundscape:setVolume( tvolume )
end
-- this is within an update function which is within main update loop as well
sfx_test:setEffect( "reverb", _currentRoom ~= "outside" )
-- called when I press button to test sfx
sfx_test:stop()
sfx_test:setVolume( Settings.Audio.Volume*Settings.Audio.SFXVolume/2 )
sfx_test:play()
-- Settings.Audio.Volume and Settings.Audio.SFXVolume is never touched/altered/edited during any point
-- tvolume is the only value which is changed, however this acts as it should, volume changes instantaniously when going inside/outside, is only lowered when the problem I stated above is in effect.