aboutsummaryrefslogtreecommitdiffstats
path: root/src/dabplus-enc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dabplus-enc.cpp')
-rw-r--r--src/dabplus-enc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp
index f186dbe..9cb9333 100644
--- a/src/dabplus-enc.cpp
+++ b/src/dabplus-enc.cpp
@@ -597,9 +597,10 @@ int main(int argc, char *argv[])
break;
}
else if (read != input_size) {
- if (inFifoSilence && ((errno==EAGAIN)||(errno==0))) {
+ if (inFifoSilence && file_in.eof()) {
memset(input_buf, 0, input_size);
read = input_size;
+ usleep((long int)input_size*1000000/(bytes_per_sample*channels*sample_rate));
} else {
fprintf(stderr, "Short file read !\n");
break;