const pa_cvolume *volume,
pa_proplist *p,
uint32_t repeat,
+ int fd,
uint32_t *stream_idx) {
file_stream *u = NULL;
pa_sample_spec ss;
pa_channel_map cm;
pa_sink_input_new_data data;
- int fd;
SF_INFO sfi;
pa_memchunk silence;
u->memblockq = NULL;
u->repeat = (repeat == 0) ? -1 : (int32_t)repeat;
- if ((fd = pa_open_cloexec(fname, O_RDONLY, 0)) < 0) {
- pa_log("Failed to open file %s: %s", fname, pa_cstrerror(errno));
- goto fail;
+ if (fd == -1) {
+ if ((fd = pa_open_cloexec(fname, O_RDONLY, 0)) < 0) {
+ pa_log("Failed to open file %s: %s", fname, pa_cstrerror(errno));
+ goto fail;
+ }
}
/* FIXME: For now we just use posix_fadvise to avoid page faults
int pa_play_file(pa_sink *sink, const char *fname, const pa_cvolume *volume);
#ifdef __TIZEN__
int pa_play_file_repeat(pa_sink *sink, const char *fname, const pa_cvolume *volume,
- pa_proplist *p, uint32_t repeat, uint32_t *stream_idx);
+ pa_proplist *p, uint32_t repeat, int fd, uint32_t *stream_idx);
#endif
#endif