From 337e6f3389356b9d3a5c15212b3d706ab5bd6398 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 29 Oct 2009 23:12:27 +0100 Subject: [PATCH] VstPlugin: flush temporary data exchange file VstPlugin creates a temporary file for exchanging data chunks of VST plugins with the remote process. After calling QFile::write(...) data has not neccessarily been written due to QFile's internal write buffer. Therefore explicitely call QFile::flush() so all data is guaranteed to be written. Fixes problems with plugins which save small data chunks. (cherry picked from commit 4b8ddcc14f16b8147e636e9a51a2391aef29a176) --- plugins/vst_base/VstPlugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/vst_base/VstPlugin.cpp b/plugins/vst_base/VstPlugin.cpp index 8d8c2ba1b..94374a8aa 100644 --- a/plugins/vst_base/VstPlugin.cpp +++ b/plugins/vst_base/VstPlugin.cpp @@ -419,6 +419,8 @@ void VstPlugin::loadChunk( const QByteArray & _chunk ) if( tf.open() ) { tf.write( _chunk ); + tf.flush(); + lock(); sendMessage( message( IdLoadSettingsFromFile ). addString(