From 98f9f48ccb1276d2fc3bcf4592cc1febea796e4b Mon Sep 17 00:00:00 2001 From: malc Date: Tue, 11 Aug 2009 20:48:02 +0400 Subject: [PATCH] Aesthetics Reformat to make item borders more visible Fix cases of stray tabs and vertical misalignments Signed-off-by: malc --- audio/alsaaudio.c | 115 +++++++++++++++++++++++++++------------------- audio/audio.c | 130 +++++++++++++++++++++++++++++++--------------------- audio/coreaudio.c | 20 ++++---- audio/dsoundaudio.c | 100 ++++++++++++++++++++++++---------------- audio/esdaudio.c | 40 +++++++++------- audio/fmodaudio.c | 109 ++++++++++++++++++++++--------------------- audio/ossaudio.c | 66 +++++++++++++++----------- audio/paaudio.c | 50 ++++++++++++-------- audio/sdlaudio.c | 10 ++-- audio/wavaudio.c | 42 ++++++++++------- 10 files changed, 394 insertions(+), 288 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 862579a..5ea49a6 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -786,10 +786,8 @@ static int alsa_run_in (HWVoiceIn *hw) int add; int len; } bufs[2] = { - {.add = hw->wpos, - .len = 0}, - {.add = 0, - .len = 0} + { .add = hw->wpos, .len = 0 }, + { .add = 0, .len = 0 } }; snd_pcm_sframes_t avail; snd_pcm_uframes_t read_samples = 0; @@ -937,50 +935,71 @@ static void alsa_audio_fini (void *opaque) } static struct audio_option alsa_options[] = { - {.name = "DAC_SIZE_IN_USEC", - .tag = AUD_OPT_BOOL, - .valp = &conf.size_in_usec_out, - .descr = "DAC period/buffer size in microseconds (otherwise in frames)"}, - {.name = "DAC_PERIOD_SIZE", - .tag = AUD_OPT_INT, - .valp = &conf.period_size_out, - .descr = "DAC period size (0 to go with system default)", - .overriddenp = &conf.period_size_out_overridden}, - {.name = "DAC_BUFFER_SIZE", - .tag = AUD_OPT_INT, - .valp = &conf.buffer_size_out, - .descr = "DAC buffer size (0 to go with system default)", - .overriddenp = &conf.buffer_size_out_overridden}, - {.name = "ADC_SIZE_IN_USEC", - .tag = AUD_OPT_BOOL, - .valp = &conf.size_in_usec_in, - .descr = "ADC period/buffer size in microseconds (otherwise in frames)"}, - {.name = "ADC_PERIOD_SIZE", - .tag = AUD_OPT_INT, - .valp = &conf.period_size_in, - .descr = "ADC period size (0 to go with system default)", - .overriddenp = &conf.period_size_in_overridden}, - {.name = "ADC_BUFFER_SIZE", - .tag = AUD_OPT_INT, - .valp = &conf.buffer_size_in, - .descr = "ADC buffer size (0 to go with system default)", - .overriddenp = &conf.buffer_size_in_overridden}, - {.name = "THRESHOLD", - .tag = AUD_OPT_INT, - .valp = &conf.threshold, - .descr = "(undocumented)"}, - {.name = "DAC_DEV", - .tag = AUD_OPT_STR, - .valp = &conf.pcm_name_out, - .descr = "DAC device name (for instance dmix)"}, - {.name = "ADC_DEV", - .tag = AUD_OPT_STR, - .valp = &conf.pcm_name_in, - .descr = "ADC device name"}, - {.name = "VERBOSE", - .tag = AUD_OPT_BOOL, - .valp = &conf.verbose, - .descr = "Behave in a more verbose way"}, + { + .name = "DAC_SIZE_IN_USEC", + .tag = AUD_OPT_BOOL, + .valp = &conf.size_in_usec_out, + .descr = "DAC period/buffer size in microseconds (otherwise in frames)" + }, + { + .name = "DAC_PERIOD_SIZE", + .tag = AUD_OPT_INT, + .valp = &conf.period_size_out, + .descr = "DAC period size (0 to go with system default)", + .overriddenp = &conf.period_size_out_overridden + }, + { + .name = "DAC_BUFFER_SIZE", + .tag = AUD_OPT_INT, + .valp = &conf.buffer_size_out, + .descr = "DAC buffer size (0 to go with system default)", + .overriddenp = &conf.buffer_size_out_overridden + }, + { + .name = "ADC_SIZE_IN_USEC", + .tag = AUD_OPT_BOOL, + .valp = &conf.size_in_usec_in, + .descr = + "ADC period/buffer size in microseconds (otherwise in frames)" + }, + { + .name = "ADC_PERIOD_SIZE", + .tag = AUD_OPT_INT, + .valp = &conf.period_size_in, + .descr = "ADC period size (0 to go with system default)", + .overriddenp = &conf.period_size_in_overridden + }, + { + .name = "ADC_BUFFER_SIZE", + .tag = AUD_OPT_INT, + .valp = &conf.buffer_size_in, + .descr = "ADC buffer size (0 to go with system default)", + .overriddenp = &conf.buffer_size_in_overridden + }, + { + .name = "THRESHOLD", + .tag = AUD_OPT_INT, + .valp = &conf.threshold, + .descr = "(undocumented)" + }, + { + .name = "DAC_DEV", + .tag = AUD_OPT_STR, + .valp = &conf.pcm_name_out, + .descr = "DAC device name (for instance dmix)" + }, + { + .name = "ADC_DEV", + .tag = AUD_OPT_STR, + .valp = &conf.pcm_name_in, + .descr = "ADC device name" + }, + { + .name = "VERBOSE", + .tag = AUD_OPT_BOOL, + .valp = &conf.verbose, + .descr = "Behave in a more verbose way" + }, { /* End of list */ } }; diff --git a/audio/audio.c b/audio/audio.c index 4033a93..766ab24 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1493,60 +1493,86 @@ static void audio_timer (void *opaque) static struct audio_option audio_options[] = { /* DAC */ - {.name = "DAC_FIXED_SETTINGS", - .tag = AUD_OPT_BOOL, - .valp = &conf.fixed_out.enabled, - .descr = "Use fixed settings for host DAC"}, - {.name = "DAC_FIXED_FREQ", - .tag = AUD_OPT_INT, - .valp = &conf.fixed_out.settings.freq, - .descr = "Frequency for fixed host DAC"}, - {.name = "DAC_FIXED_FMT", - .tag = AUD_OPT_FMT, - .valp = &conf.fixed_out.settings.fmt, - .descr = "Format for fixed host DAC"}, - {.name = "DAC_FIXED_CHANNELS", - .tag = AUD_OPT_INT, - .valp = &conf.fixed_out.settings.nchannels, - .descr = "Number of channels for fixed DAC (1 - mono, 2 - stereo)"}, - {.name = "DAC_VOICES", - .tag = AUD_OPT_INT, - .valp = &conf.fixed_out.nb_voices, - .descr = "Number of voices for DAC"}, + { + .name = "DAC_FIXED_SETTINGS", + .tag = AUD_OPT_BOOL, + .valp = &conf.fixed_out.enabled, + .descr = "Use fixed settings for host DAC" + }, + { + .name = "DAC_FIXED_FREQ", + .tag = AUD_OPT_INT, + .valp = &conf.fixed_out.settings.freq, + .descr = "Frequency for fixed host DAC" + }, + { + .name = "DAC_FIXED_FMT", + .tag = AUD_OPT_FMT, + .valp = &conf.fixed_out.settings.fmt, + .descr = "Format for fixed host DAC" + }, + { + .name = "DAC_FIXED_CHANNELS", + .tag = AUD_OPT_INT, + .valp = &conf.fixed_out.settings.nchannels, + .descr = "Number of channels for fixed DAC (1 - mono, 2 - stereo)" + }, + { + .name = "DAC_VOICES", + .tag = AUD_OPT_INT, + .valp = &conf.fixed_out.nb_voices, + .descr = "Number of voices for DAC" + }, /* ADC */ - {.name = "ADC_FIXED_SETTINGS", - .tag = AUD_OPT_BOOL, - .valp = &conf.fixed_in.enabled, - .descr = "Use fixed settings for host ADC"}, - {.name = "ADC_FIXED_FREQ", - .tag = AUD_OPT_INT, - .valp = &conf.fixed_in.settings.freq, - .descr = "Frequency for fixed host ADC"}, - {.name = "ADC_FIXED_FMT", - .tag = AUD_OPT_FMT, - .valp = &conf.fixed_in.settings.fmt, - .descr = "Format for fixed host ADC"}, - {.name = "ADC_FIXED_CHANNELS", - .tag = AUD_OPT_INT, - .valp = &conf.fixed_in.settings.nchannels, - .descr = "Number of channels for fixed ADC (1 - mono, 2 - stereo)"}, - {.name = "ADC_VOICES", - .tag = AUD_OPT_INT, - .valp = &conf.fixed_in.nb_voices, - .descr = "Number of voices for ADC"}, + { + .name = "ADC_FIXED_SETTINGS", + .tag = AUD_OPT_BOOL, + .valp = &conf.fixed_in.enabled, + .descr = "Use fixed settings for host ADC" + }, + { + .name = "ADC_FIXED_FREQ", + .tag = AUD_OPT_INT, + .valp = &conf.fixed_in.settings.freq, + .descr = "Frequency for fixed host ADC" + }, + { + .name = "ADC_FIXED_FMT", + .tag = AUD_OPT_FMT, + .valp = &conf.fixed_in.settings.fmt, + .descr = "Format for fixed host ADC" + }, + { + .name = "ADC_FIXED_CHANNELS", + .tag = AUD_OPT_INT, + .valp = &conf.fixed_in.settings.nchannels, + .descr = "Number of channels for fixed ADC (1 - mono, 2 - stereo)" + }, + { + .name = "ADC_VOICES", + .tag = AUD_OPT_INT, + .valp = &conf.fixed_in.nb_voices, + .descr = "Number of voices for ADC" + }, /* Misc */ - {.name = "TIMER_PERIOD", - .tag = AUD_OPT_INT, - .valp = &conf.period.hertz, - .descr = "Timer period in HZ (0 - use lowest possible)"}, - {.name = "PLIVE", - .tag = AUD_OPT_BOOL, - .valp = &conf.plive, - .descr = "(undocumented)"}, - {.name = "LOG_TO_MONITOR", - .tag = AUD_OPT_BOOL, - .valp = &conf.log_to_monitor, - .descr = ".descr = print logging messages to monitor instead of stderr"}, + { + .name = "TIMER_PERIOD", + .tag = AUD_OPT_INT, + .valp = &conf.period.hertz, + .descr = "Timer period in HZ (0 - use lowest possible)" + }, + { + .name = "PLIVE", + .tag = AUD_OPT_BOOL, + .valp = &conf.plive, + .descr = "(undocumented)" + }, + { + .name = "LOG_TO_MONITOR", + .tag = AUD_OPT_BOOL, + .valp = &conf.log_to_monitor, + .descr = ".descr = print logging messages to monitor instead of stderr" + }, { /* End of list */ } }; diff --git a/audio/coreaudio.c b/audio/coreaudio.c index 3494470..dab4e5f 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c @@ -513,14 +513,18 @@ static void coreaudio_audio_fini (void *opaque) } static struct audio_option coreaudio_options[] = { - {.name = "BUFFER_SIZE", - .tag = AUD_OPT_INT, - .valp = &conf.buffer_frames, - .descr = "Size of the buffer in frames"}, - {.name = "BUFFER_COUNT", - .tag = AUD_OPT_INT, - .valp = &conf.nbuffers, - .descr = "Number of buffers"}, + { + .name = "BUFFER_SIZE", + .tag = AUD_OPT_INT, + .valp = &conf.buffer_frames, + .descr = "Size of the buffer in frames" + }, + { + .name = "BUFFER_COUNT", + .tag = AUD_OPT_INT, + .valp = &conf.nbuffers, + .descr = "Number of buffers" + }, { /* End of list */ } }; diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c index 45c1dfd..5376b59 100644 --- a/audio/dsoundaudio.c +++ b/audio/dsoundaudio.c @@ -1033,46 +1033,66 @@ static void *dsound_audio_init (void) } static struct audio_option dsound_options[] = { - {.name = "LOCK_RETRIES", - .tag = AUD_OPT_INT, - .valp = &conf.lock_retries, - .descr = "Number of times to attempt locking the buffer"}, - {.name = "RESTOURE_RETRIES", - .tag = AUD_OPT_INT, - .valp = &conf.restore_retries, - .descr = "Number of times to attempt restoring the buffer"}, - {.name = "GETSTATUS_RETRIES", - .tag = AUD_OPT_INT, - .valp = &conf.getstatus_retries, - .descr = "Number of times to attempt getting status of the buffer"}, - {.name = "SET_PRIMARY", - .tag = AUD_OPT_BOOL, - .valp = &conf.set_primary - .descr = "Set the parameters of primary buffer"}, - {.name = "LATENCY_MILLIS", - .tag = AUD_OPT_INT, - .valp = &conf.latency_millis, - .descr = "(undocumented)"}, - {.name = "PRIMARY_FREQ", - .tag = AUD_OPT_INT, - .valp = &conf.settings.freq, - .descr = "Primary buffer frequency"}, - {.name = "PRIMARY_CHANNELS", - .tag = AUD_OPT_INT, - .valp = &conf.settings.nchannels, - .descr = "Primary buffer number of channels (1 - mono, 2 - stereo)"}, - {.name = "PRIMARY_FMT", - .tag = AUD_OPT_FMT, - .valp = &conf.settings.fmt, - .descr = "Primary buffer format"}, - {.name = "BUFSIZE_OUT", - .tag = AUD_OPT_INT, - .valp = &conf.bufsize_out, - .descr = "(undocumented)"}, - {.name = "BUFSIZE_IN", - .tag = AUD_OPT_INT, - .valp = &conf.bufsize_in, - .descr = "(undocumented)"}, + { + .name = "LOCK_RETRIES", + .tag = AUD_OPT_INT, + .valp = &conf.lock_retries, + .descr = "Number of times to attempt locking the buffer" + }, + { + .name = "RESTOURE_RETRIES", + .tag = AUD_OPT_INT, + .valp = &conf.restore_retries, + .descr = "Number of times to attempt restoring the buffer" + }, + { + .name = "GETSTATUS_RETRIES", + .tag = AUD_OPT_INT, + .valp = &conf.getstatus_retries, + .descr = "Number of times to attempt getting status of the buffer" + }, + { + .name = "SET_PRIMARY", + .tag = AUD_OPT_BOOL, + .valp = &conf.set_primary + .descr = "Set the parameters of primary buffer" + }, + { + .name = "LATENCY_MILLIS", + .tag = AUD_OPT_INT, + .valp = &conf.latency_millis, + .descr = "(undocumented)" + }, + { + .name = "PRIMARY_FREQ", + .tag = AUD_OPT_INT, + .valp = &conf.settings.freq, + .descr = "Primary buffer frequency" + }, + { + .name = "PRIMARY_CHANNELS", + .tag = AUD_OPT_INT, + .valp = &conf.settings.nchannels, + .descr = "Primary buffer number of channels (1 - mono, 2 - stereo)" + }, + { + .name = "PRIMARY_FMT", + .tag = AUD_OPT_FMT, + .valp = &conf.settings.fmt, + .descr = "Primary buffer format" + }, + { + .name = "BUFSIZE_OUT", + .tag = AUD_OPT_INT, + .valp = &conf.bufsize_out, + .descr = "(undocumented)" + }, + { + .name = "BUFSIZE_IN", + .tag = AUD_OPT_INT, + .valp = &conf.bufsize_in, + .descr = "(undocumented)" + }, { /* End of list */ } }; diff --git a/audio/esdaudio.c b/audio/esdaudio.c index 4648fd4..b61ee7f 100644 --- a/audio/esdaudio.c +++ b/audio/esdaudio.c @@ -549,22 +549,30 @@ static void qesd_audio_fini (void *opaque) } struct audio_option qesd_options[] = { - {.name = "SAMPLES", - .tag = AUD_OPT_INT, - .valp = &conf.samples, - .descr = "buffer size in samples"}, - {.name = "DIVISOR", - .tag = AUD_OPT_INT, - .valp = &conf.divisor, - .descr = "threshold divisor"}, - {.name = "DAC_HOST", - .tag = AUD_OPT_STR, - .valp = &conf.dac_host, - .descr = "playback host"}, - {.name = "ADC_HOST", - .tag = AUD_OPT_STR, - .valp = &conf.adc_host, - .descr = "capture host"}, + { + .name = "SAMPLES", + .tag = AUD_OPT_INT, + .valp = &conf.samples, + .descr = "buffer size in samples" + }, + { + .name = "DIVISOR", + .tag = AUD_OPT_INT, + .valp = &conf.divisor, + .descr = "threshold divisor" + }, + { + .name = "DAC_HOST", + .tag = AUD_OPT_STR, + .valp = &conf.dac_host, + .descr = "playback host" + }, + { + .name = "ADC_HOST", + .tag = AUD_OPT_STR, + .valp = &conf.adc_host, + .descr = "capture host" + }, { /* End of list */ } }; diff --git a/audio/fmodaudio.c b/audio/fmodaudio.c index 11ad09b..ab6a242 100644 --- a/audio/fmodaudio.c +++ b/audio/fmodaudio.c @@ -513,40 +513,27 @@ static struct { const char *name; int type; } drvtab[] = { - {.name = "none", - .type = FSOUND_OUTPUT_NOSOUND}, + { .name = "none", .type = FSOUND_OUTPUT_NOSOUND }, #ifdef _WIN32 - {.name = "winmm", - .type = FSOUND_OUTPUT_WINMM}, - {.name = "dsound", - .type = FSOUND_OUTPUT_DSOUND}, - {.name = "a3d", - .type = FSOUND_OUTPUT_A3D}, - {.name = "asio", - .type = FSOUND_OUTPUT_ASIO}, + { .name = "winmm", .type = FSOUND_OUTPUT_WINMM }, + { .name = "dsound", .type = FSOUND_OUTPUT_DSOUND }, + { .name = "a3d", .type = FSOUND_OUTPUT_A3D }, + { .name = "asio", .type = FSOUND_OUTPUT_ASIO }, #endif #ifdef __linux__ - {.name = "oss", - .type = FSOUND_OUTPUT_OSS}, - {.name = "alsa", - .type = FSOUND_OUTPUT_ALSA}, - {.name = "esd", - .type = FSOUND_OUTPUT_ESD}, + { .name = "oss", .type = FSOUND_OUTPUT_OSS }, + { .name = "alsa", .type = FSOUND_OUTPUT_ALSA }, + { .name = "esd", .type = FSOUND_OUTPUT_ESD }, #endif #ifdef __APPLE__ - {.name = "mac", - .type = FSOUND_OUTPUT_MAC}, + { .name = "mac", .type = FSOUND_OUTPUT_MAC }, #endif #if 0 - {.name = "xbox", - .type = FSOUND_OUTPUT_XBOX}, - {.name = "ps2", - .type = FSOUND_OUTPUT_PS2}, - {.name = "gcube", - .type = FSOUND_OUTPUT_GC}, + { .name = "xbox", .type = FSOUND_OUTPUT_XBOX }, + { .name = "ps2", .type = FSOUND_OUTPUT_PS2 }, + { .name = "gcube", .type = FSOUND_OUTPUT_GC }, #endif - {.name = "none-realtime", - .type = FSOUND_OUTPUT_NOSOUND_NONREALTIME} + { .name = "none-realtime", .type = FSOUND_OUTPUT_NOSOUND_NONREALTIME } }; static void *fmod_audio_init (void) @@ -648,31 +635,43 @@ static void fmod_audio_fini (void *opaque) } static struct audio_option fmod_options[] = { - {.name = "DRV", - .tag = AUD_OPT_STR, - .valp = &conf.drvname, - .descr = "FMOD driver"}, - {.name = "FREQ", - .tag = AUD_OPT_INT, - .valp = &conf.freq, - .descr = "Default frequency"}, - {.name = "SAMPLES", - .tag = AUD_OPT_INT, - .valp = &conf.nb_samples, - .descr = "Buffer size in samples"}, - {.name = "CHANNELS", - .tag = AUD_OPT_INT, - .valp = &conf.nb_channels, - .descr = "Number of default channels (1 - mono, 2 - stereo)"}, - {.name = "BUFSIZE", - .tag = AUD_OPT_INT, - .valp = &conf.bufsize, - .descr = "(undocumented)"} + { + .name = "DRV", + .tag = AUD_OPT_STR, + .valp = &conf.drvname, + .descr = "FMOD driver" + }, + { + .name = "FREQ", + .tag = AUD_OPT_INT, + .valp = &conf.freq, + .descr = "Default frequency" + }, + { + .name = "SAMPLES", + .tag = AUD_OPT_INT, + .valp = &conf.nb_samples, + .descr = "Buffer size in samples" + }, + { + .name = "CHANNELS", + .tag = AUD_OPT_INT, + .valp = &conf.nb_channels, + .descr = "Number of default channels (1 - mono, 2 - stereo)" + }, + { + .name = "BUFSIZE", + .tag = AUD_OPT_INT, + .valp = &conf.bufsize, + .descr = "(undocumented)" + } #if 0 - {.name = "THRESHOLD", - .tag = AUD_OPT_INT, - .valp = &conf.threshold, - .descr = "(undocumented)"} + { + .name = "THRESHOLD", + .tag = AUD_OPT_INT, + .valp = &conf.threshold, + .descr = "(undocumented)" + } #endif { /* End of list */ } }; @@ -684,11 +683,11 @@ static struct audio_pcm_ops fmod_pcm_ops = { .write = fmod_write, .ctl_out = fmod_ctl_out, - .init_in = fmod_init_in, - .fini_in = fmod_fini_in, - .run_in = fmod_run_in, - .read = fmod_read, - .ctl_in = fmod_ctl_in + .init_in = fmod_init_in, + .fini_in = fmod_fini_in, + .run_in = fmod_run_in, + .read = fmod_read, + .ctl_in = fmod_ctl_in }; struct audio_driver fmod_audio_driver = { diff --git a/audio/ossaudio.c b/audio/ossaudio.c index bda2756..18152b5 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -654,10 +654,8 @@ static int oss_run_in (HWVoiceIn *hw) int add; int len; } bufs[2] = { - {.add = hw->wpos, - .len = 0}, - {.add = 0, - .len = 0} + { .add = hw->wpos, .len = 0 }, + { .add = 0, .len = 0 } }; if (!dead) { @@ -738,30 +736,42 @@ static void oss_audio_fini (void *opaque) } static struct audio_option oss_options[] = { - {.name = "FRAGSIZE", - .tag = AUD_OPT_INT, - .valp = &conf.fragsize, - .descr = "Fragment size in bytes"}, - {.name = "NFRAGS", - .tag = AUD_OPT_INT, - .valp = &conf.nfrags, - .descr = "Number of fragments"}, - {.name = "MMAP", - .tag = AUD_OPT_BOOL, - .valp = &conf.try_mmap, - .descr = "Try using memory mapped access"}, - {.name = "DAC_DEV", - .tag = AUD_OPT_STR, - .valp = &conf.devpath_out, - .descr = "Path to DAC device"}, - {.name = "ADC_DEV", - .tag = AUD_OPT_STR, - .valp = &conf.devpath_in, - .descr = "Path to ADC device"}, - {.name = "DEBUG", - .tag = AUD_OPT_BOOL, - .valp = &conf.debug, - .descr = "Turn on some debugging messages"}, + { + .name = "FRAGSIZE", + .tag = AUD_OPT_INT, + .valp = &conf.fragsize, + .descr = "Fragment size in bytes" + }, + { + .name = "NFRAGS", + .tag = AUD_OPT_INT, + .valp = &conf.nfrags, + .descr = "Number of fragments" + }, + { + .name = "MMAP", + .tag = AUD_OPT_BOOL, + .valp = &conf.try_mmap, + .descr = "Try using memory mapped access" + }, + { + .name = "DAC_DEV", + .tag = AUD_OPT_STR, + .valp = &conf.devpath_out, + .descr = "Path to DAC device" + }, + { + .name = "ADC_DEV", + .tag = AUD_OPT_STR, + .valp = &conf.devpath_in, + .descr = "Path to ADC device" + }, + { + .name = "DEBUG", + .tag = AUD_OPT_BOOL, + .valp = &conf.debug, + .descr = "Turn on some debugging messages" + }, { /* End of list */ } }; diff --git a/audio/paaudio.c b/audio/paaudio.c index dbc4081..cf415f4 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -466,26 +466,36 @@ static void qpa_audio_fini (void *opaque) } struct audio_option qpa_options[] = { - {.name = "SAMPLES", - .tag = AUD_OPT_INT, - .valp = &conf.samples, - .descr = "buffer size in samples"}, - {.name = "DIVISOR", - .tag = AUD_OPT_INT, - .valp = &conf.divisor, - .descr = "threshold divisor"}, - {.name = "SERVER", - .tag = AUD_OPT_STR, - .valp = &conf.server, - .descr = "server address"}, - {.name = "SINK", - .tag = AUD_OPT_STR, - .valp = &conf.sink, - .descr = "sink device name"}, - {.name = "SOURCE", - .tag = AUD_OPT_STR, - .valp = &conf.source, - .descr = "source device name"}, + { + .name = "SAMPLES", + .tag = AUD_OPT_INT, + .valp = &conf.samples, + .descr = "buffer size in samples" + }, + { + .name = "DIVISOR", + .tag = AUD_OPT_INT, + .valp = &conf.divisor, + .descr = "threshold divisor" + }, + { + .name = "SERVER", + .tag = AUD_OPT_STR, + .valp = &conf.server, + .descr = "server address" + }, + { + .name = "SINK", + .tag = AUD_OPT_STR, + .valp = &conf.sink, + .descr = "sink device name" + }, + { + .name = "SOURCE", + .tag = AUD_OPT_STR, + .valp = &conf.source, + .descr = "source device name" + }, { /* End of list */ } }; diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index 864060d..895c3bf 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -420,10 +420,12 @@ static void sdl_audio_fini (void *opaque) } static struct audio_option sdl_options[] = { - {.name = "SAMPLES", - .tag = AUD_OPT_INT, - .valp = &conf.nb_samples, - .descr = "Size of SDL buffer in samples"}, + { + .name = "SAMPLES", + .tag = AUD_OPT_INT, + .valp = &conf.nb_samples, + .descr = "Size of SDL buffer in samples" + }, { /* End of list */ } }; diff --git a/audio/wavaudio.c b/audio/wavaudio.c index 8d1d714..c4aa60e 100644 --- a/audio/wavaudio.c +++ b/audio/wavaudio.c @@ -216,22 +216,30 @@ static void wav_audio_fini (void *opaque) } static struct audio_option wav_options[] = { - {.name = "FREQUENCY", - .tag = AUD_OPT_INT, - .valp = &conf.settings.freq, - .descr = "Frequency"}, - {.name = "FORMAT", - .tag = AUD_OPT_FMT, - .valp = &conf.settings.fmt, - .descr = "Format"}, - {.name = "DAC_FIXED_CHANNELS", - .tag = AUD_OPT_INT, - .valp = &conf.settings.nchannels, - .descr = "Number of channels (1 - mono, 2 - stereo)"}, - {.name = "PATH", - .tag = AUD_OPT_STR, - .valp = &conf.wav_path, - .descr = "Path to wave file"}, + { + .name = "FREQUENCY", + .tag = AUD_OPT_INT, + .valp = &conf.settings.freq, + .descr = "Frequency" + }, + { + .name = "FORMAT", + .tag = AUD_OPT_FMT, + .valp = &conf.settings.fmt, + .descr = "Format" + }, + { + .name = "DAC_FIXED_CHANNELS", + .tag = AUD_OPT_INT, + .valp = &conf.settings.nchannels, + .descr = "Number of channels (1 - mono, 2 - stereo)" + }, + { + .name = "PATH", + .tag = AUD_OPT_STR, + .valp = &conf.wav_path, + .descr = "Path to wave file" + }, { /* End of list */ } }; @@ -249,7 +257,7 @@ struct audio_driver wav_audio_driver = { .options = wav_options, .init = wav_audio_init, .fini = wav_audio_fini, - .pcm_ops = &wav_pcm_ops, + .pcm_ops = &wav_pcm_ops, .can_be_default = 0, .max_voices_out = 1, .max_voices_in = 0, -- 2.7.4