Commit a503656b63beaf40b364f00cc949ad146d517243
Okay, it does make sound now. Worst PWM generator ever.
anonymous authored on 12/31/2015, 11:39:21 AMChristopher Snowhill committed on 6/13/2018, 12:10:58 AM
Parent: c3f9fac332da3f478e273f6331fd38974cc07666
Files changed
src/main.c | changed |
src/main.c | ||
---|---|---|
@@ -91,18 +91,17 @@ | ||
91 | 91 | header[i].dwBufferLength = ((44100*2*2)/50); |
92 | 92 | header[i].lpData = (LPSTR)audiobuffer[i]; |
93 | 93 | } |
94 | 94 | for ( i=0; i<BUFFNUM-1; i++ ){ |
95 | - mixChunk(audiobuffer[nextbuf], 1024); | |
95 | + mixChunk(audiobuffer[nextbuf], 512); | |
96 | 96 | waveOutPrepareHeader( hWaveOut, &header[nextbuf], sizeof( WAVEHDR ) ); |
97 | 97 | waveOutWrite( hWaveOut, &header[nextbuf], sizeof( WAVEHDR ) ); |
98 | 98 | nextbuf = (nextbuf+1)%BUFFNUM; |
99 | 99 | } |
100 | - | |
101 | 100 | resumePlay(); |
102 | 101 | for(;;) |
103 | 102 | { |
104 | - mixChunk(audiobuffer[nextbuf], 1024); | |
103 | + mixChunk(audiobuffer[nextbuf], 512); | |
105 | 104 | waveOutPrepareHeader( hWaveOut, &header[nextbuf], sizeof( WAVEHDR ) ); |
106 | 105 | waveOutWrite( hWaveOut, &header[nextbuf], sizeof( WAVEHDR ) ); |
107 | 106 | nextbuf = (nextbuf+1)%BUFFNUM; |
108 | 107 |
Built with git-ssb-web