Funkin icon indicating copy to clipboard operation
Funkin copied to clipboard

Bug Report: desktop audio quality issue

Open cyn0x8 opened this issue 1 year ago • 14 comments

Describe the bug

the audio quality/clarity on desktop builds is noticeably worse than that of html5/web builds (at least on windows, im unable to test on mac/linux)

To Reproduce

simply play the game on desktop and web and compare the audio quality to each other

Expected behavior

game audio should sound the same as in html5 builds or a media player

Screenshots/Video

desktop:

https://github.com/FunkinCrew/Funkin/assets/58795684/d439c50c-81cb-4261-9b83-a6d4f147119c

web:

https://github.com/FunkinCrew/Funkin/assets/58795684/bd458cbe-9ef5-4037-a1cd-f207e2ccf2c4

Desktop

  • OS: Windows 10, Windows 11
  • Version: 0.4.1 (as well as earlier versions, and even other engines)

cyn0x8 avatar Jul 07 '24 23:07 cyn0x8

The difference in audio quality is due to the use of .ogg files rather than html's .mp3 files.

This might be a limitation with HaxeFlixel, so the audio quality may always be different between desktop and web.

Hundrec avatar Jul 07 '24 23:07 Hundrec

The difference in audio quality is due to the use of .ogg files rather than html's .mp3 files.

This might be a limitation with HaxeFlixel, so the audio quality may always be different between desktop and web.

the audio quality in the files themselves are pretty much the same, the change only appears ingame unless you mean like how theyre decoded

also i asked around and was told this is likely lime/openfl related so maybe it can be fixed in a fork??

cyn0x8 avatar Jul 08 '24 00:07 cyn0x8

Whoops, I mistakenly equated file size with audio quality!

Anyway, I do hope the audio quality can be improved with some code tweaks or even an overhauled audio system.

Hundrec avatar Jul 08 '24 00:07 Hundrec

Whoops, I mistakenly equated file size with audio quality!

Anyway, I do hope the audio quality can be improved with some code tweaks or even an overhauled audio system.

tbh an audio system like fmod would be pretty cool to have in fnf but i dont know if its possible

im guessing itd also fix this weird audio delay that sometimes happens (#57 #2222 #2888) or maybe even eliminate the need to resync audio in the first place

https://github.com/FunkinCrew/Funkin/assets/58795684/52c5faf7-df0c-46eb-b01a-e375d779ad8c

cyn0x8 avatar Jul 08 '24 01:07 cyn0x8

I love that bug, it's hilarious

The video in https://github.com/FunkinCrew/Funkin/issues/2888 is even funnier

Hundrec avatar Jul 08 '24 01:07 Hundrec

id probably say js target's audio quality is notably worse when reproducing the audio even if it sounds normal when extracted

tposejank avatar Jul 08 '24 05:07 tposejank

I reviewed the videos and I do not hear the issue at all.

Also note that the audio files used for the game itself are fairly low quality on both desktop and web in order to improve bandwidth and download size.

EliteMasterEric avatar Jul 09 '24 08:07 EliteMasterEric

I think the difference in quality is so subtle that most listeners can't even tell the difference through most output devices

Hundrec avatar Jul 09 '24 08:07 Hundrec

I reviewed the videos and I do not hear the issue at all.

Also note that the audio files used for the game itself are fairly low quality on both desktop and web in order to improve bandwidth and download size.

both the original mp3 and ogg audio files themselves sound fine (as in played with a media player or something) and also sound nearly the same ingame on the web build

though on desktop something weird seems to be happening ingame where all audio (mostly high treble) feels slightly muted/less crisp and the stereo not as full

it depends on which headphones/speakers/whatever you use, but on decent drivers the difference is noticeable

https://github.com/FunkinCrew/Funkin/assets/58795684/b21c94f2-ab3d-4d5b-a9ac-01d0d197aad0

another big indicator of something going on is these artifacts appearing when viewed through a spectrogram (not a bug with the spectrogram, both recordings are pcm wav)

image


I think the difference in quality is so subtle that most listeners can't even tell the difference through most output devices

thats true, but for a music game i think its pretty important to have crisp audio!! im currently working on a mod and want players to hear the music as it was meant to be listened to

cyn0x8 avatar Jul 11 '24 06:07 cyn0x8

Whoops, I mistakenly equated file size with audio quality!

Anyway, I do hope the audio quality can be improved with some code tweaks or even an overhauled audio system.

Of course this issue should be corrected! I'm a fan of high audio quality myself :)

Hundrec avatar Jul 11 '24 06:07 Hundrec

both the original mp3 and ogg audio files themselves sound fine (as in played with a media player or something) and also sound nearly the same ingame on the web build

though on desktop something weird seems to be happening ingame where all audio (mostly high treble) feels slightly muted/less crisp and the stereo not as full

it depends on which headphones/speakers/whatever you use, but on decent drivers the difference is noticeable

I do hear it, desktop sounds ever so slightly more muffled

AbnormalPoof avatar Jul 11 '24 13:07 AbnormalPoof

Personally I don't see it, I respect audiophiles though. My headphones are very cheap

tposejank avatar Jul 11 '24 14:07 tposejank

I reviewed the videos and I do not hear the issue at all. Also note that the audio files used for the game itself are fairly low quality on both desktop and web in order to improve bandwidth and download size.

both the original mp3 and ogg audio files themselves sound fine (as in played with a media player or something) and also sound nearly the same ingame on the web build

though on desktop something weird seems to be happening ingame where all audio (mostly high treble) feels slightly muted/less crisp and the stereo not as full

it depends on which headphones/speakers/whatever you use, but on decent drivers the difference is noticeable

comparison.mp4 another big indicator of something going on is these artifacts appearing when viewed through a spectrogram (not a bug with the spectrogram, both recordings are pcm wav)

image

I think the difference in quality is so subtle that most listeners can't even tell the difference through most output devices

thats true, but for a music game i think its pretty important to have crisp audio!! im currently working on a mod and want players to hear the music as it was meant to be listened to

I definitely feel/hear the difference here.

It feels like the web and original version in the recording are on par, with desktop being lower in volume and slightly muffled.

It was subtle in previous recordings, but, it was still noticable.

doggogit avatar Aug 04 '24 13:08 doggogit

ive been told this is likely OpenAL virtualizing the audio by default with headphones?? which would make sense that itd sound this way... a game like this doesnt need 3d audio im not too good with low level stuff but ill still investigate it soon and try to come up with any possible fixes !!

cyn0x8 avatar Aug 25 '24 07:08 cyn0x8

solved by #3318

cyn0x8 avatar Sep 16 '24 03:09 cyn0x8

Re-opening this with pending pull request since the PR hasn't been merged yet.

AbnormalPoof avatar Feb 22 '25 19:02 AbnormalPoof

Work with me Linear...

Hundrec avatar Jul 16 '25 13:07 Hundrec

This was resolved internally, albeit with a different method. The original author of the PR will still get credit in the changelog though!

AbnormalPoof avatar Jul 17 '25 02:07 AbnormalPoof