From 83daa2d8fb567dd5bee1814b4a79be9ece4be517 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 2 Jul 2011 14:15:52 +0200 Subject: [PATCH] SampleBuffer: do not use UTF-8 filenames on Windows As libogg, libsndfile & friends do not seem to have an UTF8-compatible implementation on Windows we have to pass the filename as local 8 bit encoding in order to make the file being read properly. Closes #2952858. --- src/core/sample_buffer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/sample_buffer.cpp b/src/core/sample_buffer.cpp index 31be999e6..df5c56c48 100644 --- a/src/core/sample_buffer.cpp +++ b/src/core/sample_buffer.cpp @@ -178,7 +178,11 @@ void sampleBuffer::update( bool _keep_settings ) else if( !m_audioFile.isEmpty() ) { QString file = tryToMakeAbsolute( m_audioFile ); +#ifdef LMMS_BUILD_WIN32 + char * f = qstrdup( file.toLocal8Bit().constData() ); +#else char * f = qstrdup( file.toUtf8().constData() ); +#endif int_sample_t * buf = NULL; ch_cnt_t channels = DEFAULT_CHANNELS; sample_rate_t samplerate = engine::getMixer()->baseSampleRate();