diff options
author | Mike Brady <mikebrady@eircom.net> | 2019-06-19 19:06:54 +0100 |
---|---|---|
committer | Mike Brady <mikebrady@eircom.net> | 2019-06-19 19:06:54 +0100 |
commit | c8b0be30b4d47f64bcc6f35dd0cb691f7979640c (patch) | |
tree | 321a5f7361012f44f4097496053475e0e4b2faf1 /audio_sndio.c | |
parent | 7fc977d8d346d90c1f262dbd033c0bb431fde919 (diff) |
find . \( -name \*.cpp -or -name \*.h -or -name \*.c \) -exec clang-format -i -style='{BasedOnStyle: llvm, IndentWidth: 2, ColumnLimit: 100}' '{}' \;
Diffstat (limited to 'audio_sndio.c')
-rw-r--r-- | audio_sndio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/audio_sndio.c b/audio_sndio.c index a591add..54e1763 100644 --- a/audio_sndio.c +++ b/audio_sndio.c @@ -76,7 +76,8 @@ struct sndio_formats { static struct sndio_formats formats[] = {{"S8", SPS_FORMAT_S8, 44100, 8, 1, 1, SIO_LE_NATIVE}, {"U8", SPS_FORMAT_U8, 44100, 8, 1, 0, SIO_LE_NATIVE}, {"S16", SPS_FORMAT_S16, 44100, 16, 2, 1, SIO_LE_NATIVE}, - {"AUTOMATIC", SPS_FORMAT_S16, 44100, 16, 2, 1, SIO_LE_NATIVE}, // TODO: make this really automatic? + {"AUTOMATIC", SPS_FORMAT_S16, 44100, 16, 2, 1, + SIO_LE_NATIVE}, // TODO: make this really automatic? {"S24", SPS_FORMAT_S24, 44100, 24, 4, 1, SIO_LE_NATIVE}, {"S24_3LE", SPS_FORMAT_S24_3LE, 44100, 24, 3, 1, 1}, {"S24_3BE", SPS_FORMAT_S24_3BE, 44100, 24, 3, 1, 0}, @@ -176,7 +177,6 @@ static int init(int argc, char **argv) { written = played = 0; time_of_last_onmove_cb = 0; at_least_one_onmove_cb_seen = 0; - for (i = 0; i < sizeof(formats) / sizeof(formats[0]); i++) { if (formats[i].fmt == config.output_format) { @@ -187,7 +187,7 @@ static int init(int argc, char **argv) { break; } } - + if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) die("sndio: failed to set audio parameters"); for (i = 0, found = 0; i < sizeof(formats) / sizeof(formats[0]); i++) { @@ -200,7 +200,6 @@ static int init(int argc, char **argv) { } if (!found) die("sndio: could not set output device to the required format and rate."); - framesize = par.bps * par.pchan; config.output_rate = par.rate; |