#ifdef __TIZEN__
if (u->repeat == -1 || --u->repeat > 0) {
sf_seek(u->sndfile, 0, SEEK_SET);
+ pa_memblock_unref(tchunk.memblock);
continue;
}
#endif
tchunk.length = (size_t) n * fs;
+#ifdef __TIZEN__
+ /* check invalid sample size */
+ if (PA_UNLIKELY(tchunk.length % pa_frame_size(&i->sample_spec))) {
+ pa_log_warn("Dropped not aligned samples. length(%zu), fs(%zu)",
+ tchunk.length, pa_frame_size(&i->sample_spec));
+ tchunk.length = PA_ROUND_DOWN(n, pa_frame_size(&i->sample_spec));
+ if (tchunk.length == 0) {
+ pa_memblock_unref(tchunk.memblock);
+ continue;
+ }
+ }
+#endif
+
pa_memblockq_push(u->memblockq, &tchunk);
pa_memblock_unref(tchunk.memblock);
}