From c7d6d3fcc75fcf702540a955665e6d9d505dadcb Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 9 Dec 2014 18:06:46 +0100 Subject: Remove bytes_per_sample, replace by existing macro --- src/dabplus-enc.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp index 7448f8b..684d3a7 100644 --- a/src/dabplus-enc.cpp +++ b/src/dabplus-enc.cpp @@ -244,7 +244,6 @@ int main(int argc, char *argv[]) const char *outuri = NULL; int sample_rate=48000, channels=2; - const int bytes_per_sample = 2; void *rs_handler = NULL; bool afterburner = true; bool inFifoSilence = false; @@ -508,7 +507,7 @@ int main(int argc, char *argv[]) } // Each DAB+ frame will need input_size audio bytes - const int input_size = channels * bytes_per_sample * info.frameLength; + const int input_size = channels * BYTES_PER_SAMPLE * info.frameLength; fprintf(stderr, "DAB+ Encoding: framelen=%d (%dB)\n", info.frameLength, input_size); @@ -670,7 +669,7 @@ int main(int argc, char *argv[]) memset(input_buf, 0, input_size); read = input_size; usleep((long)input_size * 1000000 / - (bytes_per_sample * channels * sample_rate)); + (BYTES_PER_SAMPLE * channels * sample_rate)); } else { fprintf(stderr, "Short file read !\n"); -- cgit v1.2.3