#ifdef DEBUG_DETAIL
debug_enter();
#endif
-
- for (plugin_id = 0; g_plugins[plugin_id].GetSupportTypes; plugin_id++) {
- /* Find codec */
- codec_type = g_plugins[plugin_id].GetSupportTypes();
- if (codec_type && (MM_SOUND_SUPPORTED_CODEC_DTMF == codec_type[0]))
- break;
+ plugin_id = _MMSoundMgrCodecFindCodecPluginID(MM_SOUND_SUPPORTED_CODEC_DTMF);
+ if (plugin_id == -1) {
+ debug_error("Could not find proper codec plugin!!!");
+ err = MM_ERROR_SOUND_INTERNAL;
+ goto cleanup;
}
/*The count num means codec type DTMF */
#ifdef DEBUG_DETAIL
debug_enter();
#endif
-
- for (plugin_id = 0; g_plugins[plugin_id].GetSupportTypes; plugin_id++) {
- /* Find codec */
- codec_type = g_plugins[plugin_id].GetSupportTypes();
- if (codec_type && (MM_SOUND_SUPPORTED_CODEC_DTMF == codec_type[0]))
- break;
+ plugin_id = _MMSoundMgrCodecFindCodecPluginID(MM_SOUND_SUPPORTED_CODEC_DTMF);
+ if (plugin_id == -1) {
+ debug_error("Could not find proper codec plugin!!!");
+ err = MM_ERROR_SOUND_INTERNAL;
+ goto cleanup;
}
/*The count num means codec type DTMF */
proplist = pa_proplist_new();
if (!proplist)
return -1;
- if (h->stream_type)
- pa_proplist_sets(proplist, PA_PROP_MEDIA_ROLE, h->stream_type);
+ pa_proplist_sets(proplist, PA_PROP_MEDIA_ROLE, h->stream_type);
if (h->stream_index != -1)
pa_proplist_setf(proplist, PA_PROP_MEDIA_PARENT_ID, "%d", h->stream_index);