diff src/gb/gbSound.cpp @ 524:7ef5c73ea8fa

working on recording sound. almost have it, but there is still unexplained popping sounds.
author Robert McIntyre <rlm@mit.edu>
date Sat, 23 Jun 2012 23:10:31 -0500
parents f9f4f1b99eed
children fa7676dbf6f2
line wrap: on
line diff
     1.1 --- a/src/gb/gbSound.cpp	Sat Jun 23 20:34:14 2012 -0500
     1.2 +++ b/src/gb/gbSound.cpp	Sat Jun 23 23:10:31 2012 -0500
     1.3 @@ -5,6 +5,7 @@
     1.4  
     1.5  #include <cstring>
     1.6  #include <cassert>
     1.7 +#include <stdio.h>
     1.8  
     1.9  #include "../common/System.h"
    1.10  #include "../common/Util.h"
    1.11 @@ -729,7 +730,7 @@
    1.12  	{
    1.13  		soundFinalWave[++soundBufferIndex] = res;
    1.14  		if ((soundFrameSoundWritten + 1) >= countof(soundFrameSound))
    1.15 -			/*assert(false)*/;
    1.16 +		  printf("oh noes!\n");
    1.17  		else
    1.18  			soundFrameSound[++soundFrameSoundWritten] = res;
    1.19  	}
    1.20 @@ -737,7 +738,7 @@
    1.21  	{
    1.22  		soundFinalWave[soundBufferIndex++] = res;
    1.23  		if (soundFrameSoundWritten >= countof(soundFrameSound))
    1.24 -			/*assert(false)*/;
    1.25 +		  printf("oh noes!\n");
    1.26  		else
    1.27  			soundFrameSound[soundFrameSoundWritten++] = res;
    1.28  	}
    1.29 @@ -816,7 +817,7 @@
    1.30  	{
    1.31  		soundFinalWave[-1 + soundBufferIndex++]		   = res;
    1.32  		if ((soundFrameSoundWritten) >= countof(soundFrameSound))
    1.33 -			/*assert(false)*/;
    1.34 +		  printf("oh noes!\n");
    1.35  		else
    1.36  			soundFrameSound[-1 + soundFrameSoundWritten++] = res;
    1.37  	}
    1.38 @@ -824,7 +825,7 @@
    1.39  	{
    1.40  		soundFinalWave[soundBufferIndex++]			  = res;
    1.41  		if ((soundFrameSoundWritten + 1) >= countof(soundFrameSound))
    1.42 -			/*assert(false)*/;
    1.43 +		  printf("oh noes!\n");
    1.44  		else
    1.45  			soundFrameSound[soundFrameSoundWritten++] = res;
    1.46  	}
    1.47 @@ -848,7 +849,8 @@
    1.48  			soundFinalWave[soundBufferIndex++] = 0;
    1.49  			soundFinalWave[soundBufferIndex++] = 0;
    1.50  			if ((soundFrameSoundWritten + 1) >= countof(soundFrameSound))
    1.51 -				/*assert(false)*/;
    1.52 +			  
    1.53 +			printf("oh noes!\n");
    1.54  			else
    1.55  			{
    1.56  				soundFrameSound[soundFrameSoundWritten++] = 0;