Day 012 - Bug on the sound

Hey guys.
I've got a bug on the code, after to watch the video "Day 012 - Platform-independent Sound Output" and coding along, my sound stopped playing. I couldn't figure out where is the bug. All that I noticed is that, the region2Size on the win32FillSoundBuffer function is always zero. I don't know if this is suposed to happens. Anyway, if someone has any idea, let me know.
Thanks.

Edited by Luiz Heringer on
Hey guys, I figured it out. For those who got the same bug. On the GameOutputSound function, I was just getting the value "[color=#0044ff] 2.0f * PI * 1.0f / (float)wavePeriod [/color]" for the tSine variable, and not using the value that a already had plus this expression. Make sure to put a "+=" operator, not only a "=". Mistakes are made. :)