blackberry/Core-Native-Community-Samples — pull request #15 by Gurtej (2013-05-14 16:19:59+00:00)
Title: New Audio Routing Enhacements

1) Use SND_PCM_STOP_ROLLOVER flag, otherwise each write must
follow a snd_pcm_plugin_status to see if the audio status is
changed and snd_pcm_plugin_prepare if underrun/overrun happens
2) Change SND_PCM_START_DATA to SND_PCM_START_FULL
3) Increase thread priority and make sure both play/capture
priority is the same
4) Changed frags_max to 5 on player thread
5) Chagned frags_max to 3 on capture thread
6) Change handset audiopath to AUDIO_TYPE_VOICE

/* Set for either speaker or earpiece */
if (speaker) {
ret = audio_manager_set_handle_type(
stream->pb_ctrl_audio_manager_handle,
AUDIO_TYPE_VIDEO_CHAT,
AUDIO_DEVICE_DEFAULT,
AUDIO_DEVICE_DEFAULT);
} else {
ret = audio_manager_set_handle_type(
stream->pb_ctrl_audio_manager_handle,
AUDIO_TYPE_VOICE,
AUDIO_DEVICE_DEFAULT,
AUDIO_DEVICE_DEFAULT);
}

7) Remove audio_manager_set_handle_routing_conditions()