Name: pulseaudio
Summary: Improved Linux sound server
Version: 5.0
-Release: 84
+Release: 85
Group: Multimedia/Audio
License: LGPL-2.1+
URL: http://pulseaudio.org
#include "ltdl-bind-now.h"
#include "server-lookup.h"
+#ifdef __TIZEN__
#define PA_READY "/tmp/.pa_ready"
#ifdef TIZEN_TV
#define PULSEAUDIO_READY "/tmp/.pulseaudio_ready"
#endif
+#endif /* __TIZEN__ */
#ifdef HAVE_LIBWRAP
/* Only one instance of these variables */
int allow_severity = LOG_INFO;
bool start_server;
#endif
+#ifdef __TIZEN__
+ int fd_pa_ready = -1;
+#ifdef TIZEN_TV
+ int fd_pulseaudio_ready = -1;
+#endif
+#endif /* __TIZEN__ */
+
pa_log_set_ident("pulseaudio");
pa_log_set_level(PA_LOG_NOTICE);
pa_log_set_flags(PA_LOG_COLORS|PA_LOG_PRINT_FILE|PA_LOG_PRINT_LEVEL, PA_LOG_RESET);
#endif
pa_log_info(_("Daemon startup complete."));
+#ifdef __TIZEN__
/* broadcast if we're ready */
- creat(PA_READY, 0644);
+ if ((fd_pa_ready = creat(PA_READY, 0644)) != -1)
+ close(fd_pa_ready);
#ifdef TIZEN_TV
- if (creat(PULSEAUDIO_READY, 0644) != -1)
+ if ((fd_pulseaudio_ready = creat(PULSEAUDIO_READY, 0644)) != -1) {
pa_log_warn("PULSEAUDIO_READY(%s) file was created", PULSEAUDIO_READY);
- else
+ close(fd_pulseaudio_ready);
+ } else {
pa_log_error("cannot create PULSEAUDIO_READY(/tmp/.pulseaudio_ready)");
+ }
#endif
+#endif /* __TIZEN__ */
retval = 0;
if (pa_mainloop_run(mainloop, &retval) < 0)
goto finish;
snd_pcm_sw_params_t *swparams;
snd_pcm_uframes_t boundary;
int err;
-#ifdef __TIZEN__
- snd_pcm_uframes_t stop_threshold = 0;
-#endif
pa_assert(pcm);
}
#ifdef __TIZEN__
- if ((err = snd_pcm_sw_params_set_stop_threshold(pcm, swparams, (stop_threshold)? stop_threshold:boundary)) < 0) {
+ if ((err = snd_pcm_sw_params_set_stop_threshold(pcm, swparams, boundary)) < 0) {
pa_log_warn("Unable to set stop threshold: %s\n", pa_alsa_strerror(err));
return err;
}
if (add_card(u) < 0)
goto fail;
-#ifdef __TIZEN_BT__
- pa_modargs_free(ma);
-#endif
+
if (!(u->msg = pa_msgobject_new(bluetooth_msg)))
goto fail;
pa_load_aptx_sym(handle);
}
#endif
+#ifdef __TIZEN_BT__
+ pa_modargs_free(ma);
+#endif
if (u->profile != PA_BLUETOOTH_PROFILE_OFF)
if (init_profile(u) < 0)
av_build_filter(c->filter_bank, factor, c->filter_length, phase_count, 1<<FILTER_SHIFT, WINDOW_TYPE);
#else // PRELOAD_FILTER
char filter_data_name[256];
- sprintf (filter_data_name, "%s/filter_%d_%d.dat", PRE_FILTER_TABLE_PATH, in_rate, out_rate);
+ pa_snprintf (filter_data_name, sizeof(filter_data_name), "%s/filter_%d_%d.dat", PRE_FILTER_TABLE_PATH, in_rate, out_rate);
#ifdef DEBUG_MODE
printf ("filter_data_name = %s\n", filter_data_name);
/* open file for dump pcm */
if (i->core->dump_sink_input && !i->dump_fp) {
time_t t;
+ struct tm tm;
char datetime[12];
char *dump_path = NULL;
time(&t);
+ tzset();
+ localtime_r(&t, &tm);
memset(&datetime[0], 0x00, sizeof(datetime));
- strftime(&datetime[0], sizeof(datetime), "%m%d_%H%M%S", localtime(&t));
+ strftime(&datetime[0], sizeof(datetime), "%m%d_%H%M%S", &tm);
dump_path = pa_sprintf_malloc("%s_%s_%d_sink%d.pcm", PA_SINK_INPUT_DUMP_PATH_PREFIX, &datetime[0], i->index, i->sink->index);
if (dump_path) {
/* open file for dump pcm */
if (o->core->dump_source_output && !o->dump_fp) {
time_t t;
+ struct tm tm;
char datetime[12];
char *dump_path = NULL;
time(&t);
+ tzset();
+ localtime_r(&t, &tm);
memset(&datetime[0], 0x00, sizeof(datetime));
- strftime(&datetime[0], sizeof(datetime), "%m%d_%H%M%S", localtime(&t));
+ strftime(&datetime[0], sizeof(datetime), "%m%d_%H%M%S", &tm);
dump_path = pa_sprintf_malloc("%s_%s_%d_source%d.pcm", PA_SOURCE_OUTPUT_DUMP_PATH_PREFIX, &datetime[0], o->index, o->source->index);
if (dump_path) {