summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/FileInput.cpp6
-rw-r--r--src/FileInput.h2
-rw-r--r--src/dabplus-enc.cpp16
3 files changed, 13 insertions, 11 deletions
diff --git a/src/FileInput.cpp b/src/FileInput.cpp
index b116e80..2b05ec3 100644
--- a/src/FileInput.cpp
+++ b/src/FileInput.cpp
@@ -98,9 +98,9 @@ ssize_t FileInput::read(uint8_t* buf, size_t length)
int FileInput::eof()
{
- int eof=feof(m_in_fh);
- clearerr(m_in_fh);
- return eof;
+ int eof = feof(m_in_fh);
+ clearerr(m_in_fh);
+ return eof;
}
diff --git a/src/FileInput.h b/src/FileInput.h
index 4f6f75e..68193bc 100644
--- a/src/FileInput.h
+++ b/src/FileInput.h
@@ -45,7 +45,7 @@ class FileInput
* Returns the number of bytes read.
*/
ssize_t read(uint8_t* buf, size_t length);
- int eof();
+ int eof();
protected:
const char* m_filename;
diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp
index 9cb9333..2822f94 100644
--- a/src/dabplus-enc.cpp
+++ b/src/dabplus-enc.cpp
@@ -598,13 +598,15 @@ int main(int argc, char *argv[])
}
else if (read != input_size) {
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;
- }
+ memset(input_buf, 0, input_size);
+ read = input_size;
+ usleep((long)input_size * 1000000 /
+ (bytes_per_sample * channels * sample_rate));
+ }
+ else {
+ fprintf(stderr, "Short file read !\n");
+ break;
+ }
}
}
else if (drift_compensation) {