X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/e9b635a3223a51d0c30867e42ec4f9b54b62e591..71b70599a2cd81c13cc4326499a5d0c45358cd7d:/clients/playrtp.c?ds=sidebyside diff --git a/clients/playrtp.c b/clients/playrtp.c index 1263d7a..484d265 100644 --- a/clients/playrtp.c +++ b/clients/playrtp.c @@ -192,9 +192,26 @@ HEAP_DEFINE(pheap, struct packet *, lt_packet); /** @brief Control socket or NULL */ const char *control_socket; +/** @brief Buffer for debugging dump + * + * The debug dump is enabled by the @c --dump option. It records the last 20s + * of audio to the specified file (which will be about 3.5Mbytes). The file is + * written as as ring buffer, so the start point will progress through it. + * + * Use clients/dump2wav to convert this to a WAV file, which can then be loaded + * into (e.g.) Audacity for further inspection. + * + * All three backends (ALSA, OSS, Core Audio) now support this option. + * + * The idea is to allow the user a few seconds to react to an audible artefact. + */ int16_t *dump_buffer; + +/** @brief Current index within debugging dump */ size_t dump_index; -size_t dump_size = 44100 * 2 * 20; /* 20s */ + +/** @brief Size of debugging dump in samples */ +size_t dump_size = 44100/*Hz*/ * 2/*channels*/ * 20/*seconds*/; static const struct option options[] = { { "help", no_argument, 0, 'h' }, @@ -516,7 +533,7 @@ static void help(void) { /* display version number and terminate */ static void version(void) { - xprintf("disorder-playrtp version %s\n", disorder_version_string); + xprintf("%s", disorder_version_string); xfclose(stdout); exit(0); }