Cannot prevent audio from aliasing when LÖVE has to resample

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

Re:

Post by pgimeno »

SeekingExpansion wrote: Tue Aug 06, 2019 11:27 pm I should've attached the results of my tests in the beginning to show what the problem was.
I attached some .ogg files to this post in case you want to hear them.
Now that I know where you expected the aliasing to appear, yes I notice it. Those high pitched notes hurt my ears, I didn't expect you to be searching there :nyu:

My audio device is an Intel HD. I presume it's working at 44.1 KHz.

At 44.1 I hear aliasing in all notes starting from A8.

At 32 *and* 48 it starts at E7, subtle but noticeable.
User avatar
SeekingExpansion
Prole
Posts: 6
Joined: Mon Aug 05, 2019 6:35 am

Post by SeekingExpansion »

pgimeno wrote: Wed Aug 07, 2019 9:58 am [...]
At 32 *and* 48 it starts at E7, subtle but noticeable.
Finally someone was able to replicate the problem.

zorg wrote: Wed Aug 07, 2019 6:47 am [...]
Also, for personal interest, i tried testing the included sample with my DAW of choice, FL studio; i imported it, it was aliasing around the same limits... tested with different interpolation methods; only 512-point sinc interpolation did not alias the highest octave supported (which is one higher than the one in your test projects), anything lower did.
I think I have clearly shown that there's nothing wrong with my code or my methods that relates to this problem happening... I mean...

I guess I couldn't actually explain myself, I think we need to stop talking about my code... let's do something simplier, let's imagine this forum thread actually begins from this post:


I have found that when I play my wave file in LÖVE, it plays with aliasing that I don't hear when I play the wave file with any other program, like Windows Media Player.

I generated the wave file using FL Studio. I know it is slightly aliased, I know it is normal. But then when I simply play it in LÖVE, it introduces way more aliasing.


Why does this happen? Does it happen to anyone else or is it just me?


This is my entire code:

Code: Select all

function love.load()
	love.audio.newSource("not_horribly_aliased.wav", "stream"):play()
end

I attached to this post three files. "Test" is the .love file of the project, "Input" is a demo of the file I try to play in LÖVE, and "Output" is what plays from LÖVE.
Attachments
Audios.zip
(101.95 KiB) Downloaded 58 times
Test.love
(309.9 KiB) Downloaded 65 times
Last edited by SeekingExpansion on Sun Aug 25, 2019 8:10 am, edited 1 time in total.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Cannot prevent audio from aliasing when LÖVE has to resample

Post by zorg »

Okay, i could hear the difference between the two audio files... but when i played the attached Test.love, it didn't alias at all... i'm guessing it does on your end with the settings within it?
Me and my stuff :3True 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.
User avatar
SeekingExpansion
Prole
Posts: 6
Joined: Mon Aug 05, 2019 6:35 am

Re: Cannot prevent audio from aliasing when LÖVE has to resample

Post by SeekingExpansion »

zorg wrote: Wed Aug 07, 2019 8:05 pm Okay, i could hear the difference between the two audio files... but when i played the attached Test.love, it didn't alias at all... i'm guessing it does on your end with the settings within it?
For now, it seems like it's mostly only happening to me. I've been looking for anyone else who experiences the same problem and could help me find out what is causing it.

My driver is Realtek Audio with 16-bits 44100kHz audio format. I don't have any other settings enabled that could alter the audio output.
I could try to look into OpenAL's code, test other OpenAL programs or test other audio drivers, but haven't actually done any of that.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], SiENcE and 6 guests