summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-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 a231923..c8016ff 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,
{
for (j = 0, sp2 = sp, fp=vecs[i] + itemsread;
j < nitems; j++, sp2 += bytesperframe, fp++)
+#ifdef ROCKBOX_BIG_ENDIAN
+ {
+ short xx = (sp2[1] << 8) | sp2[0];
+ *fp = xx << (fix1-16);
+ }
+#else
*fp = ((short*)sp2)[0]<<(fix1-16);
+#endif
}
}
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 8b8c6bc..484e6fa 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)
canvas_getdir(glist_getcanvas(x->x_glist))->s_name,
filename->s_name, "", buf, &bufptr, MAXPDSTRING, 0)) < 0
#ifdef ROCKBOX
- )
+ || !(fd = filedesc))
#else
|| !(fd = fdopen(filedesc, "r")))
#endif
@@ -1234,7 +1234,7 @@ static void garray_read16(t_garray *x, t_symbol *filename,
canvas_getdir(glist_getcanvas(x->x_glist))->s_name,
filename->s_name, "", buf, &bufptr, MAXPDSTRING, 1)) < 0
#ifdef ROCKBOX
- )
+ || !(fd = filedesc))
#else
|| !(fd = fdopen(filedesc, BINREADMODE)))
#endif