Home | History | Annotate | Download | only in sandbox

Lines Matching refs:buffer

17 // Play an audio file using buffer queue
45 unsigned which; // which buffer to use next
82 // This callback is called each time a buffer finishes playing
88 short *buffer = &buffers[framesPerBuffer * sfinfo.channels * which];
89 ssize_t count = pipeReader->read(buffer, framesPerBuffer, (int64_t) -1);
92 memset(buffer, 0, framesPerBuffer * sfinfo.channels * sizeof(short));
99 swab(buffer, buffer, nbytes);
102 squeeze(buffer, (unsigned char *) buffer, nbytes);
105 SLresult result = (*bufq)->Enqueue(bufq, buffer, nbytes);
220 fprintf(stderr, " -f# frames per buffer (default 512)\n");
421 // get the buffer queue interface
429 short *buffer = &buffers[framesPerBuffer * sfinfo.channels * which];
432 count = sf_readf_short(sndfile, buffer, frames);
438 // enqueue a buffer
441 swab(buffer, buffer, nbytes);
444 squeeze(buffer, (unsigned char *) buffer, nbytes);
447 result = (*playerBufferQueue)->Enqueue(playerBufferQueue, buffer, nbytes);
454 // register a callback on the buffer queue
486 // wait until the buffer queue is empty