diff --git a/src/options.c b/src/options.c index fc05e875..a872de35 100644 --- a/src/options.c +++ b/src/options.c @@ -125,49 +125,49 @@ static void usage(char *s, struct options *options) } static const struct option lopt[] = { - { "amiga", 0, 0, 'A' }, - { "amplify", 1, 0, 'a' }, - { "bits", 1, 0, 'b' }, - { "driver", 1, 0, 'd' }, - { "default-pan", 1, 0, 'p' }, - { "fix-sample-loops", 0, 0, OPT_FIXLOOP }, - { "frequency", 1, 0, 'f' }, - { "help", 0, 0, 'h' }, - { "instrument-path", 1, 0, 'I' }, - { "interpolation", 1, 0, 'i' }, - { "list-formats", 0, 0, 'L' }, - { "loop", 0, 0, 'l' }, - { "loop-all", 0, 0, OPT_LOOPALL }, - { "loop-until", 1, 0, 'U' }, - { "mixer-voices", 1, 0, OPT_NUMVOICES }, - { "mono", 0, 0, 'm' }, - { "mute", 1, 0, 'M' }, - { "null", 0, 0, 'N' }, - { "nocmd", 0, 0, OPT_NOCMD }, - { "norc", 0, 0, OPT_NORC }, - { "nofilter", 0, 0, 'F' }, - /* { "offset-bug-emulation",0, 0, OPT_FX9BUG }, */ - { "output-file", 1, 0, 'o' }, - { "pan", 1, 0, 'P' }, - { "player-mode", 1, 0, 'e' }, - { "probe-only", 0, 0, OPT_PROBEONLY }, - { "load-only", 0, 0, OPT_LOADONLY }, - { "quiet", 0, 0, 'q' }, - { "random", 0, 0, 'R' }, - { "reverse", 0, 0, 'r' }, - { "show-comment", 0, 0, 'C' }, - { "solo", 1, 0, 'S' }, - { "start", 1, 0, 's' }, - { "stdout", 0, 0, 'c' }, - { "tempo", 1, 0, 'T' }, - { "time", 1, 0, 't' }, - { "unsigned", 0, 0, 'u' }, - { "vblank", 0, 0, OPT_VBLANK }, - { "version", 0, 0, 'V' }, - { "verbose", 0, 0, 'v' }, - { "all-sequences", 1, 0, 'Z' }, - { "sequence", 1, 0, 'z' }, - { NULL, 0, 0, 0 } + { "amiga", 0, NULL, 'A' }, + { "amplify", 1, NULL, 'a' }, + { "bits", 1, NULL, 'b' }, + { "driver", 1, NULL, 'd' }, + { "default-pan", 1, NULL, 'p' }, + { "fix-sample-loops", 0, NULL, OPT_FIXLOOP }, + { "frequency", 1, NULL, 'f' }, + { "help", 0, NULL, 'h' }, + { "instrument-path", 1, NULL, 'I' }, + { "interpolation", 1, NULL, 'i' }, + { "list-formats", 0, NULL, 'L' }, + { "loop", 0, NULL, 'l' }, + { "loop-all", 0, NULL, OPT_LOOPALL }, + { "loop-until", 1, NULL, 'U' }, + { "mixer-voices", 1, NULL, OPT_NUMVOICES }, + { "mono", 0, NULL, 'm' }, + { "mute", 1, NULL, 'M' }, + { "null", 0, NULL, 'N' }, + { "nocmd", 0, NULL, OPT_NOCMD }, + { "norc", 0, NULL, OPT_NORC }, + { "nofilter", 0, NULL, 'F' }, +/* { "offset-bug-emulation",0, NULL, OPT_FX9BUG }, */ + { "output-file", 1, NULL, 'o' }, + { "pan", 1, NULL, 'P' }, + { "player-mode", 1, NULL, 'e' }, + { "probe-only", 0, NULL, OPT_PROBEONLY }, + { "load-only", 0, NULL, OPT_LOADONLY }, + { "quiet", 0, NULL, 'q' }, + { "random", 0, NULL, 'R' }, + { "reverse", 0, NULL, 'r' }, + { "show-comment", 0, NULL, 'C' }, + { "solo", 1, NULL, 'S' }, + { "start", 1, NULL, 's' }, + { "stdout", 0, NULL, 'c' }, + { "tempo", 1, NULL, 'T' }, + { "time", 1, NULL, 't' }, + { "unsigned", 0, NULL, 'u' }, + { "vblank", 0, NULL, OPT_VBLANK }, + { "version", 0, NULL, 'V' }, + { "verbose", 0, NULL, 'v' }, + { "all-sequences", 1, NULL, 'Z' }, + { "sequence", 1, NULL, 'z' }, + { NULL, 0, NULL, 0 } }; diff --git a/src/sound_alsa.c b/src/sound_alsa.c index c7675eff..89050cf5 100644 --- a/src/sound_alsa.c +++ b/src/sound_alsa.c @@ -52,21 +52,19 @@ static int init(struct options *options) snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED); snd_pcm_hw_params_set_format(pcm_handle, hwparams, fmt); - snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &rate, 0); + snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &rate, NULL); snd_pcm_hw_params_set_channels_near(pcm_handle, hwparams, &channels); - snd_pcm_hw_params_set_buffer_time_near(pcm_handle, hwparams, &btime, 0); - snd_pcm_hw_params_set_period_time_near(pcm_handle, hwparams, &ptime, 0); + snd_pcm_hw_params_set_buffer_time_near(pcm_handle, hwparams, &btime, NULL); + snd_pcm_hw_params_set_period_time_near(pcm_handle, hwparams, &ptime, NULL); snd_pcm_nonblock(pcm_handle, 0); if ((ret = snd_pcm_hw_params(pcm_handle, hwparams)) < 0) { - fprintf(stderr, "Unable to set ALSA output parameters: %s\n", - snd_strerror(ret)); + fprintf(stderr, "Unable to set ALSA output parameters: %s\n", snd_strerror(ret)); return -1; } if ((ret = snd_pcm_prepare(pcm_handle)) < 0) { - fprintf(stderr, "Unable to prepare ALSA: %s\n", - snd_strerror(ret)); + fprintf(stderr, "Unable to prepare ALSA: %s\n", snd_strerror(ret)); return -1; } @@ -132,4 +130,3 @@ const struct sound_driver sound_alsa = { onpause, onresume }; -