static int need_to_request_new_audio_file(struct vss_task *vsst)
{
+ struct timeval diff;
+
if (vsst->map) /* have audio file */
return 0;
if (!vss_playing()) /* don't need one */
return 0;
if (vsst->afsss == AFS_SOCKET_AFD_PENDING) /* already requested one */
return 0;
+ if (chk_barrier("autoplay_delay", &vsst->autoplay_barrier,
+ &diff, 1) < 0)
+ return 0;
return 1;
}
tv_add(&mmd->afd.afhi.eof_tv, now, &vsst->eof_barrier);
mmd->chunks_sent = 0;
} else if (vss_repos()) {
+ tv_add(now, &vsst->announce_tv, &vsst->data_send_barrier);
tv_add(&mmd->afd.afhi.eof_tv, now, &vsst->eof_barrier);
mmd->chunks_sent = 0;
mmd->current_chunk = mmd->repos_request;
continue;
senders[i].post_select(&s->rfds, &s->wfds);
}
- if (vss_playing() && !(mmd->vss_status_flags & VSS_PLAYING))
+ if ((vss_playing() && !(mmd->vss_status_flags & VSS_PLAYING)) ||
+ (vss_next() && vss_playing()))
tv_add(now, &vsst->announce_tv, &vsst->data_send_barrier);
vss_send_chunk(vsst);
}
mmd->new_vss_status_flags |= VSS_PLAYING;
ms2tv(autoplay_delay, &tmp);
tv_add(now, &tmp, &vsst->autoplay_barrier);
+ tv_add(&vsst->autoplay_barrier, &vsst->announce_tv,
+ &vsst->data_send_barrier);
}
register_task(&vsst->task);
}