Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in sfx noise behaviour switching from 0.70.6 to 0.80-dev #1140

Closed
nalquas opened this issue Jul 27, 2020 · 5 comments
Closed

Difference in sfx noise behaviour switching from 0.70.6 to 0.80-dev #1140

nalquas opened this issue Jul 27, 2020 · 5 comments
Assignees

Comments

@nalquas
Copy link
Contributor

nalquas commented Jul 27, 2020

There appears to be some sort of change in how sfx is handling noise playback.
First noticed this in my game Mainfighter when trying it in 0.80-dev, here's how to reproduce it:

-- title:  Noise test
-- author: Nalquas
-- desc:   Attempting to reproduce a bug I observed in Mainfighter
-- script: lua

function TIC()
	cls(0)
	if btn(4) then
		sfx(0,"C#4",-1,0,8,0)
		print("Noise C#4")
	else
		sfx(0,"C-4",-1,0,8,0)
		print("Noise C-4")
	end
end

The sound effect 0 looks as follows:
Screenshot_20200727_095247
And finally, here's the cartridge (GitHub doesn't let me upload it directly, so here's a zipped version): noisetest.tic.zip

Here's how the difference actually sounds (uploaded to Youtube because GitHub doesn't allow embedding of videos...):
First, TIC-80 0.70.6:
https://www.youtube.com/watch?v=H3-I2KurdR0
And TIC-80 0.80.1267-dev Pro (built from source through AUR, Linux 64bit):
https://www.youtube.com/watch?v=o4cCFK0ySOI

@nesbox
Copy link
Owner

nesbox commented Jul 27, 2020

Thank you for the detailed report, we will investigate this.

@saijyothi6
Copy link

Looks like we won't get 0.80 this year ;-;

@nalquas
Copy link
Contributor Author

nalquas commented Aug 9, 2020

To help narrow the issue down, I compiled some old commits to see where noise broke.
The first broken commit appears to be 8b158b0, so the issue has to be in this commit somewhere.
For the record, here are all the commits I've tested:

WORKIN e7f4746b3c23e6e9b980fc1f02eb5be29fca5c34 Mar 15
WORKIN 383aabf23ff905a37a1bd946c1d00a52d8cda229 Apr 17
WORKIN dc817a127d74852ede98f631fb1987a05a7ba0ca Apr 20
WORKIN a2015f4716e5c12df9a16c42377973b5ddfaa9c6 Apr 28
WORKIN 0d7ef8439c0dc45821fbdd29c1b51a25b7126a62 Apr 30
WORKIN 7043d2b94228876daeee582652ad00a8992f0f17 May 01 -- LAST WORKING COMMIT
BROKEN 8b158b073e42bfae0460cd1c9d88f1c8b0a8c9af May 02 -- FIRST BROKEN COMMIT
BROKEN 0717a19bd17e6cc6eca43dbfbe694ddda3a0f8a5 May 03
BROKEN 49547daa451043aa3c4da09dab7ead6d7fdcb887 May 17

@nesbox nesbox self-assigned this Aug 9, 2020
nesbox added a commit that referenced this issue Aug 9, 2020
@nesbox
Copy link
Owner

nesbox commented Aug 9, 2020

Fixed here 5cd8e42, pls check it
Thank you.

@nesbox nesbox closed this as completed Aug 9, 2020
@nalquas
Copy link
Contributor Author

nalquas commented Aug 9, 2020

Yup, works perfectly now.
Thank you for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants