Lines Matching defs:res
19 fbl::unique_ptr<AudioOutput> res(new (&ac) AudioOutput(dev_id));
22 return res;
27 fbl::unique_ptr<AudioOutput> res(new (&ac) AudioOutput(dev_path));
30 return res;
34 zx_status_t res;
40 res = source.GetFormat(&format);
41 if (res != ZX_OK) {
42 printf("Failed to get source's format (res %d)\n", res);
43 return res;
46 res = SetFormat(format.frame_rate, format.channels, format.sample_format);
47 if (res != ZX_OK) {
48 printf("Failed to set source format [%u Hz, %hu Chan, %08x fmt] (res %d)\n",
49 format.frame_rate, format.channels, format.sample_format, res);
50 return res;
58 res = GetBuffer(480 * 20 * 3, 3);
59 if (res != ZX_OK) {
60 printf("Failed to set output format (res %d)\n", res);
61 return res;
95 res = source.GetFrames(buf + wr, fbl::min(space, rb_sz_ - wr), &done);
96 if (res != ZX_OK) {
97 printf("Error packing frames (res %d)\n", res);
121 if (res != ZX_OK)
126 res = StartRingBuffer();
127 if (res != ZX_OK) {
134 res = rb_ch_.wait_one(ZX_CHANNEL_READABLE | ZX_CHANNEL_PEER_CLOSED,
137 if (res != ZX_OK) {
138 printf("Failed to wait for notificiation (res %d)\n", res);
147 res = rb_ch_.read(0,
150 if (res != ZX_OK) {
151 printf("Failed to read notification from ring buffer channel (res %d)\n", res);
158 res = ZX_ERR_INTERNAL;
165 res = ZX_ERR_INTERNAL;
184 if (res == ZX_OK) {
195 if (res == ZX_OK)
196 res = stop_res;
198 return res;