summaryrefslogtreecommitdiffstats
path: root/src/dabplus-enc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dabplus-enc.cpp')
-rw-r--r--src/dabplus-enc.cpp35
1 files changed, 23 insertions, 12 deletions
diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp
index 1117277..0862690 100644
--- a/src/dabplus-enc.cpp
+++ b/src/dabplus-enc.cpp
@@ -102,7 +102,7 @@ void usage(const char* name) {
" --ps Force the usage of PS\n"
" Output and pad parameters:\n"
" -o, --output=URI Output zmq uri. (e.g. 'tcp://localhost:9000')\n"
- " -or- Output file uri. (e.g. 'file.dab')\n"
+ " -or- Output file uri. (e.g. 'file.dabp')\n"
" -or- a single dash '-' to denote stdout\n"
" -k, --secret-key=FILE Enable ZMQ encryption with the given secret key.\n"
" -p, --pad=BYTES Set PAD size in bytes.\n"
@@ -832,24 +832,35 @@ int main(int argc, char *argv[])
}
}
- if (out_args.numOutBytes + row*10 == outbuf_size) {
- if (show_level) {
+ if (show_level) {
+ if (channels == 1) {
+ fprintf(stderr, "\rIn: [%-6s] %1s %1s %1s",
+ level(1, MAX(peak_right, peak_left)),
+ status & STATUS_PAD_INSERTED ? "P" : " ",
+ status & STATUS_UNDERRUN ? "U" : " ",
+ status & STATUS_OVERRUN ? "O" : " ");
+ }
+ else if (channels == 2) {
fprintf(stderr, "\rIn: [%6s|%-6s] %1s %1s %1s",
- level(0, &peak_left),
- level(1, &peak_right),
+ level(0, peak_left),
+ level(1, peak_right),
status & STATUS_PAD_INSERTED ? "P" : " ",
status & STATUS_UNDERRUN ? "U" : " ",
status & STATUS_OVERRUN ? "O" : " ");
}
- else {
- if (status & STATUS_OVERRUN) {
- fprintf(stderr, "O");
- }
- if (status & STATUS_UNDERRUN) {
- fprintf(stderr, "U");
- }
+ peak_right = 0;
+ peak_left = 0;
+ }
+ else {
+ if (status & STATUS_OVERRUN) {
+ fprintf(stderr, "O");
}
+
+ if (status & STATUS_UNDERRUN) {
+ fprintf(stderr, "U");
+ }
+
}
status = 0;