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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user