PARA_ERROR(EMPTY, "file is empty"), \
PARA_ERROR(ENCRYPT, "encrypt error"), \
PARA_ERROR(EOF, "end of file"), \
+ PARA_ERROR(EOP, "end of playlist"), \
PARA_ERROR(FEC_BAD_IDX, "invalid index vector"), \
PARA_ERROR(FECDEC_EOF, "received eof packet"), \
PARA_ERROR(FECDEC_OVERRUN, "fecdec output buffer overrun"), \
[option randomize]
short_opt = z
summary = randomize playlist at startup
+ [option end-of-playlist]
+ summary = what to do after the last file has been played
+ arg_info = required_arg
+ arg_type = string
+ typestr = behaviour
+ values = {
+ EOP_LOOP = "loop",
+ EOP_STOP = "stop",
+ EOP_QUIT = "quit"
+ }
[option key-map]
short_opt = k
summary = map a key to a command
return result;
}
-
static void wipe_receiver_node(void)
{
PARA_NOTICE_LOG("cleaning up receiver node\n");
int i, j = pt->current_file;
unsigned num_inputs = lls_num_inputs(play_lpr);
+ if (j == num_inputs - 1) {
+ switch (OPT_UINT32_VAL(END_OF_PLAYLIST)) {
+ case EOP_LOOP: break;
+ case EOP_STOP:
+ pt->playing = false;
+ return 0;
+ case EOP_QUIT: return -E_EOP;
+ }
+ }
for (i = 0; i < num_inputs; i++) {
j = (j + 1) % num_inputs;
if (!pt->invalid[j])
init_shuffle_map();
pt->invalid = para_calloc(sizeof(*pt->invalid) * num_inputs);
pt->rq = CRT_FILE_CHANGE;
- pt->current_file = num_inputs - 1;
pt->playing = true;
pt->task = task_register(&(struct task_info){
.name = "play",