--- uae/src/od-win32/sound.h 2018/04/24 16:40:31 1.1.1.1 +++ uae/src/od-win32/sound.h 2018/04/24 16:42:56 1.1.1.2 @@ -6,37 +6,19 @@ * Copyright 1997 Bernd Schmidt */ -extern char *sndptr, *sndptrmax; +extern char *sndptr, *sndptrmax, *sndptrhalfway; extern int sndbuf, currbuf; extern char *lpData; -extern int samplecount; +extern unsigned int samplecount; + +extern void flush_sound_buffer( void ); static __inline__ void check_sound_buffers (void) { + if( sndptr == sndptrmax ) + flush_sound_buffer(); } -#if 0 -#define PUT_SOUND_BYTE(b) \ - if (sndptr == sndptrmax) { \ - if (++currbuf >= NUMSNDBUFS) currbuf -= NUMSNDBUFS; \ - sndptr = wavehdr[currbuf].lpData; \ - sndptrmax = sndptr+sndbufsize; \ - } \ - *sndptr++ = b; \ - bytesinbuf++; - - -#define PUT_SOUND_WORD(b) \ - if (sndptr == sndptrmax) { \ - if (++currbuf >= NUMSNDBUFS) currbuf -= NUMSNDBUFS; \ - sndptr = wavehdr[currbuf].lpData; \ - sndptrmax = sndptr+sndbufsize; \ - } \ - *(short *)sndptr = b; \ - sndptr += 2; \ - bytesinbuf += 2; -#endif - #define PUT_SOUND_BYTE(b) \ if (sndptr == sndptrmax) { \ sndptr = lpData; \