Lines Matching defs:buffer

326     /* the secondary buffer (Playback) */
328 /* the secondary buffer (Capture) */
331 /* size of the directsound buffer, usually 2 seconds */
340 /* where to write into the buffer.
417 ** the buffer must continue to exist as long as the buffer is playing.
425 /* starts DirectSound buffer (playback or capture) */
516 /* helper routines for DS buffer positions */
655 /* fill buffer with silence
684 // for unknown reason with hardware DS buffer playCursor sometimes
686 // The issue happens right after start playing and for short sounds only (less then DS buffer,
687 // when whole sound written into the buffer and remaining space filled by silence)
689 // whole buffer by silence.
691 || (writeCursor < playCursor // buffer bound is between playCursor & writeCursor
715 DEBUG_SILENCING2(" clearing buffer from %d, count=%d. ", (int)start, (int) count);
730 ERROR0("\n DS_clearBuffer: ERROR: Failed to lock sound buffer.\n");
739 ERROR0(" DS_clearBuffer: ERROR: Failed to lock sound buffer.\n");
759 ERROR1(" DS_clearbuffer: ERROR: silencedBytes=%d exceeds buffer size!\n",
771 /* returns pointer to buffer */
781 void* buffer;
783 TRACE1("Creating secondary buffer for device %d\n", info->deviceID);
790 /* 2 second secondary buffer */
808 (&dsbdesc, (LPDIRECTSOUNDBUFFER*) &buffer, NULL);
816 (&dscbdesc, (LPDIRECTSOUNDCAPTUREBUFFER*) &buffer, NULL);
819 ERROR1("DS_createSoundBuffer: ERROR: Failed to create sound buffer: %s", TranslateDSError(res));
822 return buffer;
843 void* buffer;
902 buffer = DS_createSoundBuffer(info,
907 if (!buffer) {
914 info->playBuffer = (LPDIRECTSOUNDBUFFER) buffer;
916 info->captureBuffer = (LPDIRECTSOUNDCAPTUREBUFFER) buffer;
918 DS_clearBuffer(info, FALSE /* entire buffer */);
946 /* only start buffer if already something written to it */
952 DS_clearBuffer(info, FALSE /* entire buffer */);
1008 /* Check buffer for underrun
1040 * for reading from the buffer: readCursor - info->writePos;
1044 * bufferSize parameter are filled by "actual" buffer size:
1057 ERROR0("DS_GetAvailable: ERROR: buffer not yet created");
1080 /* always full buffer if at beginning */
1086 // playCursor surpassed writePos - no valid data, whole buffer available
1090 // so "actual" buffer size has grown
1110 /* always empty buffer if at beginning */
1128 /* advance read position, to allow exactly one buffer worth of data */
1179 DS_clearBuffer(info, FALSE /* entire buffer */);
1189 /* buffer could be locked successfully */
1190 /* first fill first buffer */
1264 /* buffer could be locked successfully */
1265 /* first fill first buffer */
1324 DS_clearBuffer(info, FALSE /* entire buffer */);
1332 DS_clearBuffer(info, FALSE /* entire buffer */);
1354 // estimate the current position with the buffer size and
1355 // the available bytes to read or write in the buffer.
1362 // buffer is played completely
1365 // javaBytePos is the position that was when the current buffer was empty
1397 // clear buffer
1405 // if we're currently playing, and the entire buffer is silenced...