Lines Matching full:vb

90   priv_t * vb = (priv_t *) ft->priv;  in startread()  local
102 vb->of = op_open_callbacks(ft, &callbacks, NULL, (size_t) 0, NULL); in startread()
103 if (vb->of == NULL) { in startread()
109 ot = op_tags(vb->of, -1); in startread()
114 ft->signal.channels = op_channel_count(vb->of, -1); in startread()
121 ft->signal.length = op_pcm_total(vb->of, -1) * ft->signal.channels; in startread()
128 vb->buf_len = DEF_BUF_LEN; in startread()
129 vb->buf_len -= vb->buf_len % (ft->signal.channels*2); /* 2 bytes per sample */ in startread()
130 vb->buf = lsx_calloc(vb->buf_len, sizeof(char)); in startread()
131 vb->start = vb->end = 0; in startread()
134 vb->eof = 0; in startread()
135 vb->current_section = -1; in startread()
146 priv_t * vb = (priv_t *) ft->priv; in refill_buffer() local
149 if (vb->start == vb->end) /* Samples all played */ in refill_buffer()
150 vb->start = vb->end = 0; in refill_buffer()
152 while (vb->end < vb->buf_len) { in refill_buffer()
153 num_read = op_read(vb->of, (opus_int16*) (vb->buf + vb->end), in refill_buffer()
154 (int) ((vb->buf_len - vb->end) / sizeof(opus_int16)), in refill_buffer()
155 &vb->current_section); in refill_buffer()
163 vb->end += num_read * sizeof(opus_int16) * ft->signal.channels; in refill_buffer()
178 priv_t * vb = (priv_t *) ft->priv; in read_samples() local
185 if (vb->start == vb->end) { in read_samples()
186 if (vb->eof) in read_samples()
190 vb->eof = 1; in read_samples()
191 if (vb->end == 0) in read_samples()
196 l = (vb->buf[vb->start + 1] << 24) in read_samples()
197 | (0xffffff & (vb->buf[vb->start] << 16)); in read_samples()
199 vb->start += 2; in read_samples()
210 priv_t * vb = (priv_t *) ft->priv; in stopread() local
212 free(vb->buf); in stopread()
213 op_free(vb->of); in stopread()
220 priv_t * vb = (priv_t *) ft->priv; in seek() local
222 return op_pcm_seek(vb->of, (opus_int64)(offset / ft->signal.channels))? SOX_EOF:SOX_SUCCESS; in seek()