summaryrefslogtreecommitdiff
path: root/plugins/tta
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-06-01 22:11:35 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-06-01 22:11:35 +0200
commitb30dc1e305dffa390ec4fd99ccd3ec7c3b9c2782 (patch)
treecde89d59fbc29d976f50eb2fbe037e98a5918db5 /plugins/tta
parent6af58c42136a609eecbc44598f27fb92197e95b2 (diff)
24bit tta support
Diffstat (limited to 'plugins/tta')
-rw-r--r--plugins/tta/ttaplug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/tta/ttaplug.c b/plugins/tta/ttaplug.c
index d3650324..3775efa0 100644
--- a/plugins/tta/ttaplug.c
+++ b/plugins/tta/ttaplug.c
@@ -130,10 +130,10 @@ tta_read_int16 (DB_fileinfo_t *_info, char *bytes, int size) {
int nn = n;
char *p = info->buffer;
while (n > 0) {
- memcpy (bytes, p, 2);
+ *((int16_t*)bytes) = (int16_t)(((uint8_t)p[1]<<8) | (uint8_t)p[0]);
bytes += 2;
if (_info->channels == 2) {
- memcpy (bytes, p + 2, 2);
+ *((int16_t*)bytes) = (int16_t)(((uint8_t)(p+info->tta.BSIZE)[1]<<8) | (uint8_t)(p+info->tta.BSIZE)[0]);
bytes += 2;
}
n--;