[low volume level music/sfx problem] how to boost volume 2x ?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: [low volume level music/sfx problem] how to boost volume 2x ?
But, when I played sound in Love2D, I noticed that the volume of one source can not exceed half the volume of the OS (as if the volume of source is divided by 2 by love2d).
- zorg
- Party member
- Posts: 3444
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: [low volume level music/sfx problem] how to boost volume 2x ?
I tested this myself with a perfect 440Hz sine wave, and it seems that if you play a mono sound, it will indeed not exceed half of what can be output to the OS, but playing a stereo one will reach max amplitude; bit depth doesn't change anything though.
Not sure if this is a bug or not (nor if anything löve can do about it, or if it's an openAlSoft (or even OS) issue/quirk) though.
This was my test code:
Code: Select all
local chans = 2
local wave = love.sound.newSoundData(44100,44100,8,chans)
local j = 0
for i=0,44100-1 do
for c=1,chans do
wave:setSample(j, math.sin(i * (440/44100) * 2 * math.pi))
j = j+1
end
end
local sound = love.audio.newSource(wave)
sound:play()
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: No registered users and 211 guests