summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Schweer <ws.seh.de>2006-06-17 15:08:46 +0000
committerWerner Schweer <ws.seh.de>2006-06-17 15:08:46 +0000
commit6d00f554ad0c293a2e1b3233db8cdb935e221632 (patch)
tree38fe84d2d76788ce4782da8d8089b89c598a0028
parentf53ca7e3fc19296de780433bc8c375ea99cf8178 (diff)
reduce stack usage to avoid stack overflow
-rw-r--r--muse/muse/wave.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/muse/muse/wave.cpp b/muse/muse/wave.cpp
index 6b1b4079..44128c2f 100644
--- a/muse/muse/wave.cpp
+++ b/muse/muse/wave.cpp
@@ -73,7 +73,6 @@ static bool copyWaveFileToProject(const QString& path)
printf("Cannot open source file: %s\n", strerror(errno));
return false;
}
-
int channels = sfinfoSrc.channels;
sf_count_t size = sfinfoSrc.frames;
@@ -108,7 +107,7 @@ static bool copyWaveFileToProject(const QString& path)
progress->show();
qApp->processEvents();
}
- sf_count_t inSize = 1024LL * 512LL;
+ sf_count_t inSize = 1024LL * 64LL;
sf_count_t samplesWritten = 0LL;
bool returnValue = true;
@@ -137,7 +136,6 @@ static bool copyWaveFileToProject(const QString& path)
sf_count_t framesToRead = (inBuffer + inSize) - inPtr;
if (framesToRead > size)
framesToRead = size;
-
sf_count_t nr = sf_readf_float(sfSrc, inPtr, framesToRead);
if (nr != framesToRead) {
printf("sound file read failed\n");