diff options
author | 2010-11-27 20:08:47 +0100 | |
---|---|---|
committer | 2010-11-27 20:08:47 +0100 | |
commit | c36458a577b7b1276ae93dd5a503a25bfd8783c1 (patch) | |
tree | d629bc92c161fadc72b7bd487945814390529b2c | |
parent | 073e8ffaf70375a5c47a14799dada1158d3d9ece (diff) |
fixed multichannel in vorbis plugin
-rw-r--r-- | plugins/vorbis/vorbis.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |