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

Audio/Windows: some audio clicking at start of every sound #1768

Closed
divVerent opened this issue Aug 17, 2021 · 11 comments
Closed

Audio/Windows: some audio clicking at start of every sound #1768

divVerent opened this issue Aug 17, 2021 · 11 comments

Comments

@divVerent
Copy link
Contributor

This is a regression from v2.1.4 - at current HEAD, there is some noticeable audio clicking in every sound.

NOTE: I don't actually have Windows - there is a slight chance this is actually a WINE issue, but even if it is, it is a regression of ebiten under WINE then.

I recorded the same game audio with WINE/PulseAudio/Audacity and my game's internal audio dumper to demonstrate the difference. At v2.1.4, this clicking does not happen.

Investigation of the wav file shows that the corruption always happens about 400 samples from start of any sound; not sure if there is any relevance to this number. To be clear, it quite surely isn't 512.

windows-sounds.zip

@divVerent
Copy link
Contributor Author

BTW issue doesn't differ between win32 and win64 builds.

@hajimehoshi
Copy link
Owner

hajimehoshi commented Aug 17, 2021

This is a regression from v2.1.4

Is this a problem not in 2.1 but in main branch?

@divVerent
Copy link
Contributor Author

The issue never happened in any 2.1 release, but exists in the main branch - yes.

@hajimehoshi
Copy link
Owner

hajimehoshi commented Aug 17, 2021

Sure, thanks.

Could you try ALSA version? a6c52b55ca03daae64bd6372690ac3eba33ddcbc

EDIT: Oops I had a wrong number.

@divVerent
Copy link
Contributor Author

divVerent commented Aug 17, 2021 via email

@hajimehoshi
Copy link
Owner

Sorry the change is for Linux, not for Windows (then I said I had a wrong number).

@divVerent
Copy link
Contributor Author

divVerent commented Aug 17, 2021 via email

@hajimehoshi hajimehoshi added this to the v2.2.0 milestone Aug 17, 2021
hajimehoshi added a commit that referenced this issue Aug 18, 2021
@hajimehoshi
Copy link
Owner

Could you try 045b14ba2111f13ed1da7c62ec722e387d138284 for Windows? Thanks!

hajimehoshi added a commit that referenced this issue Aug 18, 2021
Also, this change reduces goroutine uses for efficiency.

Updates #1768
@hajimehoshi
Copy link
Owner

ded679c07135db8699e06cb270a32308da984051 I added further improvements based on other people's feedbacks.

@divVerent
Copy link
Contributor Author

divVerent commented Aug 18, 2021 via email

@hajimehoshi
Copy link
Owner

Thanks! We've also confirmed some slight clicking noises, but this should be much better than before.

Probably we have to switch a better audio API like WASAPI, but I'll take a look in another milestone.

Thank you for feedbacks and experiments!

hajimehoshi added a commit that referenced this issue Aug 18, 2021
Also this change uses smaller but more headers to improve the
response time.

Updates #1768
hajimehoshi added a commit that referenced this issue Aug 18, 2021
Also this change changed the buffers to use smaller but more
headers to improve latency.

Updates #1768
hajimehoshi added a commit that referenced this issue Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants