214 | | 6. .. and so on |
215 | | |
216 | | |
217 | | |
| 214 | 6. '''Latency''' setting. Old code: |
| 215 | {{{ |
| 216 | pjmedia_snd_set_latency(rec_latency, play_latency); |
| 217 | }}} |
| 218 | New code: |
| 219 | {{{ |
| 220 | // Latency setting is now part of stream creation parameter |
| 221 | pjmedia_aud_dev_param param; |
| 222 | |
| 223 | ... |
| 224 | param.flags |= (PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY | |
| 225 | PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY); |
| 226 | param.input_latency_ms = ..; |
| 227 | param.output_latency_ms = ..; |
| 228 | |
| 229 | status = pjmedia_aud_stream_create(¶m, .. ); |
| 230 | }}} |
| 231 | 7. Device routing. Old code (supported on APS only): |
| 232 | {{{ |
| 233 | pjmedia_snd_aps_activate_loudspeaker(stream, PJ_TRUE); |
| 234 | }}} |
| 235 | New code: |
| 236 | {{{ |
| 237 | int value = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER; |
| 238 | |
| 239 | status = pjmedia_aud_stream_set_cap(stream, |
| 240 | PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE, |
| 241 | &value); |
| 242 | }}} |
| 243 | |
| 244 | |
| 245 | |