summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox')
-rw-r--r--apps/plugins/pdbox/PDa/src/d_soundfile.c7
-rw-r--r--apps/plugins/pdbox/PDa/src/g_array.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/apps/plugins/pdbox/PDa/src/d_soundfile.c b/apps/plugins/pdbox/PDa/src/d_soundfile.c
index a23192319d..c8016ff302 100644
--- a/apps/plugins/pdbox/PDa/src/d_soundfile.c
+++ b/apps/plugins/pdbox/PDa/src/d_soundfile.c
@@ -423,7 +423,14 @@ static void soundfile_xferin(int sfchannels, int nvecs, t_sample **vecs,
423 { 423 {
424 for (j = 0, sp2 = sp, fp=vecs[i] + itemsread; 424 for (j = 0, sp2 = sp, fp=vecs[i] + itemsread;
425 j < nitems; j++, sp2 += bytesperframe, fp++) 425 j < nitems; j++, sp2 += bytesperframe, fp++)
426#ifdef ROCKBOX_BIG_ENDIAN
427 {
428 short xx = (sp2[1] << 8) | sp2[0];
429 *fp = xx << (fix1-16);
430 }
431#else
426 *fp = ((short*)sp2)[0]<<(fix1-16); 432 *fp = ((short*)sp2)[0]<<(fix1-16);
433#endif
427 } 434 }
428 } 435 }
429 else if (bytespersamp == 3) 436 else if (bytespersamp == 3)
diff --git a/apps/plugins/pdbox/PDa/src/g_array.c b/apps/plugins/pdbox/PDa/src/g_array.c
index 8b8c6bcd5a..484e6fa33d 100644
--- a/apps/plugins/pdbox/PDa/src/g_array.c
+++ b/apps/plugins/pdbox/PDa/src/g_array.c
@@ -1154,7 +1154,7 @@ static void garray_read(t_garray *x, t_symbol *filename)
1154 canvas_getdir(glist_getcanvas(x->x_glist))->s_name, 1154 canvas_getdir(glist_getcanvas(x->x_glist))->s_name,
1155 filename->s_name, "", buf, &bufptr, MAXPDSTRING, 0)) < 0 1155 filename->s_name, "", buf, &bufptr, MAXPDSTRING, 0)) < 0
1156#ifdef ROCKBOX 1156#ifdef ROCKBOX
1157 ) 1157 || !(fd = filedesc))
1158#else 1158#else
1159 || !(fd = fdopen(filedesc, "r"))) 1159 || !(fd = fdopen(filedesc, "r")))
1160#endif 1160#endif
@@ -1234,7 +1234,7 @@ static void garray_read16(t_garray *x, t_symbol *filename,
1234 canvas_getdir(glist_getcanvas(x->x_glist))->s_name, 1234 canvas_getdir(glist_getcanvas(x->x_glist))->s_name,
1235 filename->s_name, "", buf, &bufptr, MAXPDSTRING, 1)) < 0 1235 filename->s_name, "", buf, &bufptr, MAXPDSTRING, 1)) < 0
1236#ifdef ROCKBOX 1236#ifdef ROCKBOX
1237 ) 1237 || !(fd = filedesc))
1238#else 1238#else
1239 || !(fd = fdopen(filedesc, BINREADMODE))) 1239 || !(fd = fdopen(filedesc, BINREADMODE)))
1240#endif 1240#endif