From a874e9ca6dd289b6833b68fcc8a1c2f6ce70d579 Mon Sep 17 00:00:00 2001 From: shattered Date: Sat, 19 Oct 2013 15:28:36 +0400 Subject: [PATCH] Unbreak sound output on NetBSD --- src/sound_netbsd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sound_netbsd.c b/src/sound_netbsd.c index f746ae2..270686a 100644 --- a/src/sound_netbsd.c +++ b/src/sound_netbsd.c @@ -68,21 +68,23 @@ static int init(struct options *options) AUDIO_INITINFO(&ainfo); + ainfo.mode = AUMODE_PLAY_ALL; ainfo.play.sample_rate = options->rate; ainfo.play.channels = options->format & XMP_FORMAT_MONO ? 1 : 2; if (options->format & XMP_FORMAT_8BIT) { ainfo.play.precision = 8; - ainfo.play.precision = AUDIO_ENCODING_ULINEAR; + ainfo.play.encoding = AUDIO_ENCODING_ULINEAR; options->format |= XMP_FORMAT_UNSIGNED; } else { ainfo.play.precision = 16; - ainfo.play.precision = AUDIO_ENCODING_SLINEAR; + ainfo.play.encoding = AUDIO_ENCODING_SLINEAR; options->format &= ~XMP_FORMAT_UNSIGNED; } ainfo.play.gain = gain; ainfo.play.buffer_size = bsize; + ainfo.blocksize = 0; if (ioctl(audio_fd, AUDIO_SETINFO, &ainfo) == -1) { close(audio_fd);