From 6d00f554ad0c293a2e1b3233db8cdb935e221632 Mon Sep 17 00:00:00 2001 From: Werner Schweer Date: Sat, 17 Jun 2006 15:08:46 +0000 Subject: reduce stack usage to avoid stack overflow --- muse/muse/wave.cpp | 4 +--- 1 file changed, 1 insertion(+), 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"); -- cgit v1.2.3