Lines Matching refs:p
101 PAVoiceIn *p = (PAVoiceIn *) hw; in qpa_get_buffer_in() local
102 PAConnection *c = p->g->conn; in qpa_get_buffer_in()
107 CHECK_DEAD_GOTO(c, p->stream, unlock_and_fail, in qpa_get_buffer_in()
110 if (!p->read_length) { in qpa_get_buffer_in()
111 r = pa_stream_peek(p->stream, &p->read_data, &p->read_length); in qpa_get_buffer_in()
116 *size = MIN(p->read_length, *size); in qpa_get_buffer_in()
119 return (void *) p->read_data; in qpa_get_buffer_in()
129 PAVoiceIn *p = (PAVoiceIn *) hw; in qpa_put_buffer_in() local
130 PAConnection *c = p->g->conn; in qpa_put_buffer_in()
135 CHECK_DEAD_GOTO(c, p->stream, unlock, in qpa_put_buffer_in()
138 assert(buf == p->read_data && size <= p->read_length); in qpa_put_buffer_in()
140 p->read_data += size; in qpa_put_buffer_in()
141 p->read_length -= size; in qpa_put_buffer_in()
143 if (size && !p->read_length) { in qpa_put_buffer_in()
144 r = pa_stream_drop(p->stream); in qpa_put_buffer_in()
154 PAVoiceIn *p = (PAVoiceIn *) hw; in qpa_read() local
155 PAConnection *c = p->g->conn; in qpa_read()
160 CHECK_DEAD_GOTO(c, p->stream, unlock_and_fail, in qpa_read()
162 if (pa_stream_get_state(p->stream) != PA_STREAM_READY) { in qpa_read()
171 if (!p->read_length) { in qpa_read()
172 r = pa_stream_peek(p->stream, &p->read_data, &p->read_length); in qpa_read()
175 if (!p->read_length) { in qpa_read()
181 l = MIN(p->read_length, length - total); in qpa_read()
182 memcpy((char *)data + total, p->read_data, l); in qpa_read()
184 p->read_data += l; in qpa_read()
185 p->read_length -= l; in qpa_read()
188 if (!p->read_length) { in qpa_read()
189 r = pa_stream_drop(p->stream); in qpa_read()
206 PAVoiceOut *p = (PAVoiceOut *)hw; in qpa_buffer_get_free() local
207 PAConnection *c = p->g->conn; in qpa_buffer_get_free()
212 CHECK_DEAD_GOTO(c, p->stream, unlock_and_fail, in qpa_buffer_get_free()
214 if (pa_stream_get_state(p->stream) != PA_STREAM_READY) { in qpa_buffer_get_free()
220 l = pa_stream_writable_size(p->stream); in qpa_buffer_get_free()
235 PAVoiceOut *p = (PAVoiceOut *)hw; in qpa_get_buffer_out() local
236 PAConnection *c = p->g->conn; in qpa_get_buffer_out()
242 CHECK_DEAD_GOTO(c, p->stream, unlock_and_fail, in qpa_get_buffer_out()
246 r = pa_stream_begin_write(p->stream, &ret, size); in qpa_get_buffer_out()
261 PAVoiceOut *p = (PAVoiceOut *)hw; in qpa_put_buffer_out() local
262 PAConnection *c = p->g->conn; in qpa_put_buffer_out()
267 CHECK_DEAD_GOTO(c, p->stream, unlock_and_fail, in qpa_put_buffer_out()
270 r = pa_stream_write(p->stream, data, length, NULL, 0LL, PA_SEEK_RELATIVE); in qpa_put_buffer_out()
283 PAVoiceOut *p = (PAVoiceOut *) hw; in qpa_write() local
284 PAConnection *c = p->g->conn; in qpa_write()
290 CHECK_DEAD_GOTO(c, p->stream, unlock_and_fail, in qpa_write()
292 if (pa_stream_get_state(p->stream) != PA_STREAM_READY) { in qpa_write()
298 l = pa_stream_writable_size(p->stream); in qpa_write()
307 r = pa_stream_write(p->stream, data, l, NULL, 0LL, PA_SEEK_RELATIVE); in qpa_write()