int period; /* open api retrun value. */
- unsigned int stream_idx;
int source_type;
} mm_sound_handle_t;
break;
}
- /* Set volume type of stream */
- if (volume_config > 0) {
- debug_log("setting gain type");
- prop_vol_type = 0; /* not used, set it system(0) temporarily */
-
- /* Set gain type of stream */
- prop_gain_type = (volume_config >> 8) & 0x000000FF;
-
- pa_proplist_setf(proplist, PA_PROP_MEDIA_TIZEN_GAIN_TYPE, "%d", prop_gain_type);
- }
-
if (stream_index != -1) {
char stream_index_s[11];
debug_msg("Set stream index [%d]", stream_index);
attr.tlength = (ss->rate / 10) * pa_sample_size(ss) * ss->channels;
attr.maxlength = -1;
attr.fragsize = 0;
- debug_msg("rate(%d), samplesize(%d), ch(%d) format(%d)", ss->rate, pa_sample_size(ss), ss->channels, ss->format);
+ debug_msg("rate(%d), samplesize(%zu), ch(%d) format(%d)", ss->rate, pa_sample_size(ss), ss->channels, ss->format);
debug_msg("prebuf(%d), minreq(%d), tlength(%d), maxlength(%d), fragsize(%d)", attr.prebuf, attr.minreq, attr.tlength,
attr.maxlength, attr.fragsize);
handle->handle = mm_sound_handle_mgr.handle_count;
ATOMIC_INC(&mm_sound_handle_mgr.lock, mm_sound_handle_mgr.handle_count); // 0 is not used
- if (0 > pa_simple_get_stream_index(s, &handle->stream_idx, &err)) {
- debug_msg("Can not get stream index %s", pa_strerror(err));
- err = MM_ERROR_SOUND_INTERNAL;
- goto fail;
- }
mm_sound_handle_mgr.handles = g_list_append(mm_sound_handle_mgr.handles, handle);
if (handle->handle == 0) {
}
debug_msg
- ("created handle[%d]. mode(%d), volumetype(%d), gain(%d), rate(%d), channels(%d), format(%d), stream_idx(%d), s(%p), source_type(%d)",
+ ("created handle[%d]. mode(%d), volumetype(%d), gain(%d), rate(%d), channels(%d), format(%d), s(%p), source_type(%d)",
handle->handle, handle->mode, handle->volume_type, handle->gain_type, handle->rate, handle->channels, ss->format,
- handle->stream_idx, handle->s, handle->source_type);
+ handle->s, handle->source_type);
if (proplist)
pa_proplist_free(proplist);
CHECK_HANDLE_RANGE(handle);
GET_HANDLE_DATA(phandle, mm_sound_handle_mgr.handles, &handle, __mm_sound_handle_comparefunc);
-#ifdef __STREAM_DEBUG__
- debug_msg("phandle(%p) s(%p), handle(%d), rate(%d), ch(%d) stream_idx(%d), buf(%p), size(%d)",
- phandle, phandle->s, phandle->handle, phandle->rate, phandle->channels, phandle->stream_idx.buf, size);
-#endif
-
if (phandle == NULL) {
debug_msg("phandle is null");
return MM_ERROR_SOUND_INTERNAL;
return MM_ERROR_SOUND_INTERNAL;
}
- debug_msg("phandle(%p) s(%p), handle(%d), rate(%d), ch(%d) stream_idx(%d)",
- phandle, phandle->s, phandle->handle, phandle->rate, phandle->channels, phandle->stream_idx);
+ debug_msg("phandle(%p) s(%p), handle(%d), rate(%d), ch(%d)",
+ phandle, phandle->s, phandle->handle, phandle->rate, phandle->channels);
switch (phandle->mode) {
case HANDLE_MODE_OUTPUT:
pa_simple_free(phandle->s);
phandle->s = NULL;
- debug_msg("leave: handle[%d] stream_index[%d]", handle, phandle->stream_idx);
+ debug_msg("leave: handle[%d]", handle);
mm_sound_handle_mgr.handles = g_list_remove(mm_sound_handle_mgr.handles, phandle);
if (phandle != NULL) {