diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-07 20:42:35 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-07 22:25:00 -0700 |
commit | 4171425550477a49433d20ecbd779e80215033bb (patch) | |
tree | 39ea56e65db6a59da85990e46e16ae5073d01ebd | |
parent | 8aa1fd6367090a7ff0a805a1ac3a627ceefc051d (diff) | |
download | mpd-4171425550477a49433d20ecbd779e80215033bb.tar.gz mpd-4171425550477a49433d20ecbd779e80215033bb.tar.xz mpd-4171425550477a49433d20ecbd779e80215033bb.zip |
alsa: avoid reassigning ad->writei
This saves me precious terminal space
Diffstat (limited to '')
-rw-r--r-- | src/audioOutputs/audioOutput_alsa.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c index b8dafe704..c34ace0fd 100644 --- a/src/audioOutputs/audioOutput_alsa.c +++ b/src/audioOutputs/audioOutput_alsa.c @@ -198,14 +198,11 @@ configure_hw: ad->useMmap = 0; } } - if (ad->useMmap) { + if (ad->useMmap) ad->writei = snd_pcm_mmap_writei; - } else { - if ((err = E(snd_pcm_hw_params_set_access, ad->pcmHandle, - hwparams, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) - goto error; - ad->writei = snd_pcm_writei; - } + else if ((err = E(snd_pcm_hw_params_set_access, ad->pcmHandle, + hwparams, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) + goto error; err = snd_pcm_hw_params_set_format(ad->pcmHandle, hwparams, bitformat); if (err < 0) { |