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

I have Question about uninitialized variable in gs_audio_impl.h #48

Open
fabyday opened this issue Sep 5, 2021 · 1 comment
Open

I have Question about uninitialized variable in gs_audio_impl.h #48

fabyday opened this issue Sep 5, 2021 · 1 comment

Comments

@fabyday
Copy link

fabyday commented Sep 5, 2021

Hello, MrFrenik

I found something weird code to me.

when I tested your example code in 19_uniform_buffers

I had Compile Warning C4700 in gs_audio_impl.h 514, 515 line

                }

                s16 target_left_sample ;
                s16 target_right_sample ;

               .
               .
               .
                s16 left_sample = (s16)((((s64)start_left_sample + (s64)target_left_sample) / 2) * sample_volume);
                s16 right_sample = (s16)((((s64)start_right_sample + (s64)target_right_sample) / 2) * sample_volume);

that variables was not initialized. (yes when turn off that warning it worked well,)
my question is I wonder if that was your intention.

thank you for reading. 👍

My env is that,
OS : Windows 10
build : visual studio 19 community

@MrFrenik
Copy link
Owner

MrFrenik commented Oct 4, 2021

Default initializing to zero will eliminate the error, so this should be fixed.

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

2 participants