I did some experimenting and tried to implement sound with WASAPI instead of DirectSound. For some reason, calling to CoCreateInstance to get an IMMDeviceEnumerator makes my compile take around 20 seconds instead of being instant. Anybody have any ideas why? I'd imagine it's something obvious that I'm not knowledgeable enough to see.
Oh, compile takes long. I though running CoCreateInstance takes long. I missed that part. Are you sure it is CoCreateInstance that gives you problem? If you comment it out, everything compiles fast? Maybe anti-virus is a problem?
Oh, right, the macro. Brain appears to be running out of energy.
Yeah, I just reconfirmed that commenting out the CoCreateInstance call makes it compile instantly. Earlier I was running into messages about the incremental linker, having to do a full link etc. though I'm not getting those messages right now. Compiler output is normal, just takes longer.
EDIT: Playing around a bit more (just with commenting/uncommenting the CoCreateInstance call) and now even with it commented out I had a long compile. But it seems like if I comment it out, have one long compile, then compile again with the same exact code, it compiles normally.
I've yet to look into why this fixed it, but it did. The problem arises when I use GetDC before using CoCreateInstance. For example, if I call GetDC the line before - compile takes 20 seconds and the program doesn't run right. If I call GetDC the line after - everything is fine. Pretty baffling, I have no idea why those two would cause some sort of conflict - in compilation, no less.