summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorWincent Balin <wincent@rockbox.org>2010-05-02 00:32:50 +0000
committerWincent Balin <wincent@rockbox.org>2010-05-02 00:32:50 +0000
commita607a6c3c2d0a63448c252b57845bafd694a1fe7 (patch)
treeb4afb87063dfd31dc1d865f7d180148e1ab2e09b /apps
parent2788f8dd5db734d370370dbacaab33500ff5fca1 (diff)
downloadrockbox-a607a6c3c2d0a63448c252b57845bafd694a1fe7.tar.gz
rockbox-a607a6c3c2d0a63448c252b57845bafd694a1fe7.tar.bz2
rockbox-a607a6c3c2d0a63448c252b57845bafd694a1fe7.zip
pdbox: Fixed loading of sound files, pdpod_drums.pd works now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25769 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/pdbox/PDa/src/d_soundfile.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/plugins/pdbox/PDa/src/d_soundfile.c b/apps/plugins/pdbox/PDa/src/d_soundfile.c
index 479655f807..67a80c9d3a 100644
--- a/apps/plugins/pdbox/PDa/src/d_soundfile.c
+++ b/apps/plugins/pdbox/PDa/src/d_soundfile.c
@@ -1118,9 +1118,7 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s,
if (finalsize > bytelimit / (channels * bytespersamp))
finalsize = bytelimit / (channels * bytespersamp);
#ifdef ROCKBOX
- fp = open_soundfile(canvas_getdir(x->x_canvas)->s_name, filename,
- headersize, &bytespersamp, &bigendian, &channels, &bytelimit,
- skipframes);
+ fp = fd;
#else
fp = fdopen(fd, "rb");
#endif
@@ -1131,7 +1129,7 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s,
int thisread = finalsize - itemsread;
thisread = (thisread > bufframes ? bufframes : thisread);
#ifdef ROCKBOX
- nitems = read(fp, sampbuf, thisread * bytespersamp * channels);
+ nitems = read(fp, sampbuf, thisread * bytespersamp * channels) / bytespersamp;
#else
nitems = fread(sampbuf, channels * bytespersamp, thisread, fp);
#endif
@@ -1141,7 +1139,7 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s,
itemsread += nitems;
}
/* zero out remaining elements of vectors */
-
+
for (i = 0; i < argc; i++)
{
#ifdef ROCKBOX