Commit 3aa8a437591202761828240a5064926d5acf6a6b
Fixed example player. I think...
anonymous authored on 1/2/2016, 8:58:32 AMChristopher Snowhill committed on 6/13/2018, 12:10:58 AM
Parent: efafdc395bc8009a01857f057e6746ab4c0db12a
Files changed
src/main.c | changed |
src/main.c | ||
---|---|---|
@@ -95,17 +95,17 @@ | ||
95 | 95 | header[i].dwBufferLength = ((44100*2*2)/50); |
96 | 96 | header[i].lpData = (LPSTR)audiobuffer[i]; |
97 | 97 | } |
98 | 98 | for ( i=0; i<BUFFNUM-1; i++ ){ |
99 | - mixChunk(player, audiobuffer[nextbuf], 512); | |
99 | + mixChunk(player, audiobuffer[nextbuf], 44100/50); | |
100 | 100 | waveOutPrepareHeader( hWaveOut, &header[nextbuf], sizeof( WAVEHDR ) ); |
101 | 101 | waveOutWrite( hWaveOut, &header[nextbuf], sizeof( WAVEHDR ) ); |
102 | 102 | nextbuf = (nextbuf+1)%BUFFNUM; |
103 | 103 | } |
104 | - resumePlay(); | |
104 | + | |
105 | 105 | for(;;) |
106 | 106 | { |
107 | - mixChunk(player, audiobuffer[nextbuf], 512); | |
107 | + mixChunk(player, audiobuffer[nextbuf], 44100/50); | |
108 | 108 | waveOutPrepareHeader( hWaveOut, &header[nextbuf], sizeof( WAVEHDR ) ); |
109 | 109 | waveOutWrite( hWaveOut, &header[nextbuf], sizeof( WAVEHDR ) ); |
110 | 110 | nextbuf = (nextbuf+1)%BUFFNUM; |
111 | 111 |
Built with git-ssb-web