summaryrefslogtreecommitdiff
path: root/plugins/shn
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-11-28 13:40:01 +0100
committerGravatar waker <wakeroid@gmail.com>2010-11-28 13:40:01 +0100
commitaebe97dea65cbd451246d6fe71f362eef91ef2ac (patch)
treed2d3151907e854f7ac764894bee6a2a4fe349b67 /plugins/shn
parent66033d0ff4c2cc652010f8531a91761106e3d808 (diff)
better shn channelmask setting
Diffstat (limited to 'plugins/shn')
-rw-r--r--plugins/shn/shn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c
index 6f9faf74..44722512 100644
--- a/plugins/shn/shn.c
+++ b/plugins/shn/shn.c
@@ -358,7 +358,9 @@ shn_init(DB_fileinfo_t *_info, DB_playItem_t *it) {
_info->fmt.bps = info->shnfile->wave_header.bits_per_sample;
_info->fmt.channels = info->shnfile->wave_header.channels;
_info->fmt.samplerate = info->shnfile->wave_header.samples_per_sec;
- _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->plugin = &plugin;
int totalsamples = info->shnfile->wave_header.length * info->shnfile->wave_header.samples_per_sec;