From 7dcb0fa50128ab924cb4fce1b2898eb1a9ab8ee8 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 16 Jun 2014 20:35:33 +0200 Subject: Indentation and code formatting --- src/FileInput.cpp | 6 +++--- src/FileInput.h | 2 +- src/dabplus-enc.cpp | 16 +++++++++------- 3 files changed, 13 insertions(+), 11 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3