From c36458a577b7b1276ae93dd5a503a25bfd8783c1 Mon Sep 17 00:00:00 2001 From: waker Date: Sat, 27 Nov 2010 20:08:47 +0100 Subject: fixed multichannel in vorbis plugin --- plugins/vorbis/vorbis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/vorbis') diff --git a/plugins/vorbis/vorbis.c b/plugins/vorbis/vorbis.c index a3a117a2..0e993d17 100644 --- a/plugins/vorbis/vorbis.c +++ b/plugins/vorbis/vorbis.c @@ -231,7 +231,9 @@ cvorbis_init (DB_fileinfo_t *_info, DB_playItem_t *it) { //_info->dataSize = ov_pcm_total (&vorbis_file, -1) * vi->channels * 2; _info->fmt.channels = info->vi->channels; _info->fmt.samplerate = info->vi->rate; - _info->fmt.channelmask = _info->fmt.channels == 1 ? DDB_SPEAKER_FRONT_LEFT : (DDB_SPEAKER_FRONT_LEFT | DDB_SPEAKER_FRONT_RIGHT); + for (int i = 0; i < _info->fmt.channels; i++) { + _info->fmt.channelmask |= 1 << i; + } _info->readpos = 0; info->currentsample = 0; -- cgit v1.2.3