• Advertisement
Sign in to follow this  

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

This topic is 3994 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
52428 = 0xcccc, which is the value MSVC's debugger uses for uninitialised data.

Looks like GetStatus() is failing. What SDK are you using? My SDK says GetStatus() takes a DWORD...

Share this post


Link to post
Share on other sites
oh i meant GetFormat, but there was an error message, so its fixed now thanks.

I forgot the size param,


i'm curious though on how you knew that it was the value of an error code?

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
Sign in to follow this  

  • Advertisement