if (!curframe->ready) {
// debug(1, "Supplying a silent frame for frame %u", read);
missing_packets++;
- memset(curframe->data, 0, input_bytes_per_frame * max_frames_per_packet);
- curframe->timestamp = 0;
+ curframe->timestamp = 0; // indicate a silent frame should be substituted
}
curframe->ready = 0;
ab_read = SUCCESSOR(ab_read);
inbuflength = inframe->length;
if (inbuf) {
play_number++;
- // if it's a supplied silent frame, let us know...
if (inframe->timestamp == 0) {
// debug(1,"Player has a supplied silent frame.");
last_seqno_read =
(SUCCESSOR(last_seqno_read) & 0xffff); // manage the packet out of sequence minder
- if (inbuf == NULL)
- debug(1, "NULL inbuf to play -- skipping it.");
- else {
- if (inbuflength == 0)
- debug(1, "empty frame to play -- skipping it (1).");
- else
- config.output->play(inbuf, inbuflength);
- }
+ config.output->play(silence, max_frames_per_packet * output_sample_ratio);
} else {
int enable_dither = 0;
}
}
}
+
// mark the frame as finished
inframe->timestamp = 0;