diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-04-25 17:53:30 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-04-25 17:53:46 +0200 |
commit | ea592d8fb591ba469db360fb32d76d7fafb117d6 (patch) | |
tree | dcc0aa33dbd32f9731ec6107893020b2de129a5b /src | |
parent | a8bd9b19bba683031f6c7a68e9e6ca653be18d6c (diff) | |
download | fdk-aac-ea592d8fb591ba469db360fb32d76d7fafb117d6.tar.gz fdk-aac-ea592d8fb591ba469db360fb32d76d7fafb117d6.tar.bz2 fdk-aac-ea592d8fb591ba469db360fb32d76d7fafb117d6.zip |
Always print underruns and overruns
Diffstat (limited to 'src')
-rw-r--r-- | src/dabplus-enc.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp index 82780d5..f45bc0a 100644 --- a/src/dabplus-enc.cpp +++ b/src/dabplus-enc.cpp @@ -60,8 +60,8 @@ void usage(const char* name) { "make sure that the encoding rate is correct by inserting or deleting\n" "audio samples.\n" "\n" - "When this option is enabled, you will see U and O<number> printed in\n" - "the console. These correspond to audio underruns and overruns caused\n" + "When this option is enabled, you will see U and O printed in the\n" + "console. These correspond to audio underruns and overruns caused\n" "by sound card clock drift. When sparse, they should not create audible\n" "artifacts.\n" "\n" @@ -692,13 +692,24 @@ int main(int argc, char *argv[]) break; } - if (show_level && out_args.numOutBytes + row*10 == outbuf_size) { - fprintf(stderr, "\rIn: [%6s|%-6s] %1s %1s %1s", - level(0, &peak_left), - level(1, &peak_right), - status & STATUS_PAD_INSERTED ? "P" : " ", - status & STATUS_UNDERRUN ? "U" : " ", - status & STATUS_OVERRUN ? "O" : " "); + if (out_args.numOutBytes + row*10 == outbuf_size) { + if (show_level) { + fprintf(stderr, "\rIn: [%6s|%-6s] %1s %1s %1s", + 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"); + } + } } status = 0; |