Name: audio-hal-emul
Summary: TIZEN Audio HAL for Emulator
-Version: 0.1.16
+Version: 0.1.17
Release: 0
Group: System/Libraries
License: Apache-2.0
URL: http://tizen.org
-Source0: audio-hal-emul-%{version}.tar.gz
+Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(iniparser)
BuildRequires: pkgconfig(dlog)
/sbin/ldconfig
%files
-%manifest audio-hal-emul.manifest
+%manifest %{name}.manifest
%defattr(-,root,root,-)
%{_hal_libdir}/libhal-backend-audio.so
%{_hal_licensedir}/%{name}/*
int err;
audio_pcm_sample_spec_s *ss;
int dir;
- snd_pcm_uframes_t _period_size, _buffer_size;
+ snd_pcm_uframes_t _period_size = 0 , _buffer_size = 0;
snd_pcm_format_t _format;
- unsigned int _rate, _channels;
- snd_pcm_uframes_t _start_threshold, _stop_threshold, _silence_threshold, _avail_min;
- unsigned int _periods;
+ unsigned int _rate = 0, _channels = 0;
+ snd_pcm_uframes_t _start_threshold = 0, _stop_threshold = 0, _silence_threshold = 0, _avail_min = 0;
+ unsigned int _periods = 0;
snd_pcm_hw_params_t *hwparams;
snd_pcm_sw_params_t *swparams;
AUDIO_LOG_ERROR("snd_pcm_sw_params_get_{start_threshold|stop_threshold|silence_threshold|avail_min}() failed : %d", err);
}
- AUDIO_LOG_DEBUG("_pcm_get_params (handle %p, format %d, rate %u, channels %u, period_size %lu, periods %u, buffer_size %lu)",
+ AUDIO_LOG_DEBUG("_pcm_get_params (handle %p, format %d, rate %u, channels %u, period_size %lu, periods %u, buffer_size %lu,",
pcm_handle, _format, _rate, _channels, _period_size, _periods, _buffer_size);
+ AUDIO_LOG_DEBUG(" start_threshold %lu, stop_threshold %lu, silence_threshold %lu, avail_min %lu)",
+ _start_threshold, _stop_threshold, _silence_threshold, _avail_min);
+
#endif
return AUDIO_RET_OK;
return AUDIO_ERR_PARAMETER;
}
- if ((err = snd_pcm_sw_params_set_start_threshold(pcm_handle, swparams, period_size / 2)) < 0) {
+ if ((err = snd_pcm_sw_params_set_start_threshold(pcm_handle, swparams, _buffer_size)) < 0) {
AUDIO_LOG_ERROR("Unable to set start threshold : %d", err);
return AUDIO_ERR_PARAMETER;
}
- if ((err = snd_pcm_sw_params_set_avail_min(pcm_handle, swparams, 1024)) < 0) {
+ if ((err = snd_pcm_sw_params_set_avail_min(pcm_handle, swparams, period_size)) < 0) {
AUDIO_LOG_ERROR("snd_pcm_sw_params_set_avail_min() failed : %d", err);
return AUDIO_ERR_PARAMETER;
}