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

Play bootSound.btsnd while shaders/pipelines are compiling #1047

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

goeiecool9999
Copy link
Contributor

@goeiecool9999 goeiecool9999 commented Dec 17, 2023

implementation of the suggestion in issue #1045
In the process I also ended up removing some duplicate code in the way that audio initialises.

@goeiecool9999 goeiecool9999 marked this pull request as ready for review December 17, 2023 19:56
@Adamillo
Copy link

Adamillo commented Dec 23, 2023

Tested on Windows but I hear nothing from bootSound.btsnd, is this option enabled by default?
Edit: Ah I see the problem, bootSound.btsnd will not be played when the latency of the audio is set to 0ms

@Adamillo
Copy link

And I found another bug. XAudio2 does not work properly with this PR no matter what latency you set it to

@goeiecool9999
Copy link
Contributor Author

goeiecool9999 commented Dec 24, 2023

Latest version should work on all API's and latency settings.
Unrelated but I think before merging these changes it's probably a good idea to make this functionality disabled by default. I think it would be startling for users who update to suddenly hear audio when loading a game. When someone has short loading times it will play just a little bit of the audio and then abruptly cut out which also isn't very polished. I also heard that audio dropouts like that can blow up speakers in exceptional cases.

@Adamillo
Copy link

The audio drop out is definitely a problem that could make your PR get blocked from merging (I say could, because I am not a maintainer). Is there a way to make the audio fade out smoothly without complicating the code?

@goeiecool9999
Copy link
Contributor Author

goeiecool9999 commented Dec 24, 2023

I may have overstated how bad of an issue it is. Going from sound to silence like that happens every time you pause a YouTube video. So I recon anyone dealing with audio systems that could actually be damaged from that knows to be extra careful when hooking up computer software to it. Main concerns are the fact that it's unexpected and unpolished.

@Adamillo
Copy link

I see, makes sense. I was a little worried with the issue but I see what you mean now

@Adamillo
Copy link

Any plans about reviews/merges for this PR?

Comment on lines +36 to +37
m_wfx.Format.nBlockAlign = (m_wfx.Format.nChannels * m_wfx.Format.wBitsPerSample) / 8; // must equal (nChannels × wBitsPerSample) / 8
m_wfx.Format.nAvgBytesPerSec = m_wfx.Format.nSamplesPerSec * m_wfx.Format.nBlockAlign; // must equal nSamplesPerSec × nBlockAlign.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed these characters to UTF-8. These were the only non-UTF8 characters in the file but GitHub doesn't detect encoding changes.

@GabIsAwesome
Copy link

is this ever getting merged?? 🫤

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

Successfully merging this pull request may close these issues.

None yet

3 participants