Lines Matching refs:buffer
134 int16_t *buffer;
156 int16_t *buffer;
178 struct resampler_buffer* buffer);
180 struct resampler_buffer* buffer);
237 if (out->buffer) {
238 free(out->buffer);
239 out->buffer = NULL;
258 if (in->buffer) {
259 free(in->buffer);
260 in->buffer = NULL;
328 out->buffer = malloc(pcm_frames_to_bytes(out->pcm, out->buffer_frames));
399 in->buffer = malloc(in->buffer_size);
408 struct resampler_buffer* buffer)
412 if (buffer_provider == NULL || buffer == NULL)
419 buffer->raw = NULL;
420 buffer->frame_count = 0;
427 (void*)in->buffer,
431 buffer->raw = NULL;
432 buffer->frame_count = 0;
441 in->buffer[i] = in->buffer[i * 2];
445 buffer->frame_count = (buffer->frame_count > in->frames_in) ?
446 in->frames_in : buffer->frame_count;
447 buffer->i16 = in->buffer + (in->pcm_config->period_size - in->frames_in);
454 struct resampler_buffer* buffer)
458 if (buffer_provider == NULL || buffer == NULL)
464 in->frames_in -= buffer->frame_count;
468 * if necessary and output the number of frames requested to the buffer specified */
469 static ssize_t read_frames(struct stream_in *in, void *buffer, ssize_t frames)
477 (int16_t *)((char *)buffer +
487 memcpy((char *)buffer +
623 static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
630 int16_t *in_buffer = (int16_t *)buffer;
658 /* detect changes in screen ON/OFF state and adapt buffer size
659 * if needed. Do not change buffer size when routed to SCO device. */
693 out->buffer, &out_frames);
694 in_buffer = out->buffer;
704 * pcm driver buffer */
732 /* do not allow abrupt changes on buffer size. Increasing/decreasing
733 * the threshold by steps of 1/4th of the buffer size keeps the write
736 * kernel buffer is really depleted to allow for smooth catching up with
937 static ssize_t in_read(struct audio_stream_in *stream, void* buffer,
964 ret = process_frames(in, buffer, frames_rq);
966 ret = read_frames(in, buffer, frames_rq);
973 int16_t *in_buffer = (int16_t *)buffer;
975 ret = pcm_read(in->pcm, in->buffer, bytes * 2);
979 in_buffer[i] = in->buffer[i * 2];
981 ret = pcm_read(in->pcm, buffer, bytes);
992 memset(buffer, 0, bytes);