Code: Select all
love.audio.setVolume(.5)
...
media.sfx.example_sound = love.audio.newSource(...)
media.sfx.example_sound:setVolume(1.0)--typed 10 here before, mistake, still not working
media.sfx.example_sound:play()--sounds soft
Code: Select all
love.audio.setVolume(.5)
...
media.sfx.example_sound = love.audio.newSource(...)
media.sfx.example_sound:setVolume(1.0)--typed 10 here before, mistake, still not working
media.sfx.example_sound:play()--sounds soft
The volume for a Source, where 1.0 is normal volume. Volume cannot be raised above 1.0.
OK, if the music is the louder one, consider something like this:Gunroar:Cannon() wrote: ↑Sun Sep 26, 2021 10:55 pm Any example with the love.audio. Unfortunately I'm confused *sigh* and sleepy. So I only use one setVolume that works for both? But the music is really louder than the sfx by default...
Code: Select all
local MUSIC_VOLUME = 0.5 -- play with this value until music and sfx sound balanced
local function newMusic(...)
local source = love.audio.newSource(...)
source:setVolume(MUSIC_VOLUME)
...
return source
end
Define close, note that the sound lib has no idea what the size of a tile is first, you need to either tell it or scale the input number according to your tile sizes, aka multiply X/Y by a random numbers till you think it sounds OK.More on setPosition is that sometimes the sound seems quiet when the source is close (16x16 game, gun shots aren't audible at 5 tiles away). Is there a way to fix this?
Users browsing this forum: No registered users and 240 guests