Sign in to follow this  
johnnyBravo

Why does dsoundbuffer8-getstatus say it has 52428 channels instead of 1(mono)?

Recommended Posts

When I am loading the wave sound buffer I checked the waveFormat.nChannels and it correctly returns 1 (mono sound). But later on I use the: WAVEFORMATEX waveFormat; buffer->GetStatus(&waveFormat,0,0); to check the number of channels and the waveFormat.nChannels returns 52428. Any ideas on whats going on? Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by johnnyBravo
i'm curious though on how you knew that it was the value of an error code?
Because I saw you weren't checking the return value of the function, meaning if it failed, the data would be uninitialised. So I checked what 52428 is in hex (using windows calculator), and it came out as "CCCC", which I know from experience is a value the MSVC debugger uses for uninitialised data.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this