aboutsummaryrefslogtreecommitdiff
path: root/pd/src/d_soundfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'pd/src/d_soundfile.c')
-rw-r--r--pd/src/d_soundfile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pd/src/d_soundfile.c b/pd/src/d_soundfile.c
index a87b014b..400c9de6 100644
--- a/pd/src/d_soundfile.c
+++ b/pd/src/d_soundfile.c
@@ -1710,6 +1710,12 @@ static t_int *readsf_perform(t_int *w)
#endif
sfread_cond_signal(&x->x_requestcondition);
sfread_cond_wait(&x->x_answercondition, &x->x_mutex);
+ /* resync local cariables -- bug fix thanks to Shahrokh */
+ vecsize = x->x_vecsize;
+ bytespersample = x->x_bytespersample;
+ sfchannels = x->x_sfchannels;
+ wantbytes = sfchannels * vecsize * bytespersample;
+ bigendian = x->x_bigendian;
#ifdef DEBUG_SOUNDFILE
pute("done\n");
#endif