Mercurial > hg > svcore
comparison data/fileio/MP3FileReader.cpp @ 1346:75ad55315db4 3.0-integration
More work on getting tests (especially file encoding ones) running on Windows. Various problems here to do with interaction with test filenames in Hg repos
author | Chris Cannam |
---|---|
date | Fri, 06 Jan 2017 15:44:55 +0000 |
parents | c380e56c95f5 |
children | b3cb0edc25cd |
comparison
equal
deleted
inserted
replaced
1345:c0cdacc47f4e | 1346:75ad55315db4 |
---|---|
31 #ifdef HAVE_ID3TAG | 31 #ifdef HAVE_ID3TAG |
32 #include <id3tag.h> | 32 #include <id3tag.h> |
33 #endif | 33 #endif |
34 | 34 |
35 #include <QFileInfo> | 35 #include <QFileInfo> |
36 | |
37 #include <QTextCodec> | |
36 | 38 |
37 #ifdef _MSC_VER | 39 #ifdef _MSC_VER |
38 #include <io.h> | 40 #include <io.h> |
39 #define open _open | 41 #define open _open |
40 #endif | 42 #endif |
73 | 75 |
74 if (m_gaplessMode == GaplessMode::Gapless) { | 76 if (m_gaplessMode == GaplessMode::Gapless) { |
75 CodedAudioFileReader::setFramesToTrim(DEFAULT_DECODER_DELAY, 0); | 77 CodedAudioFileReader::setFramesToTrim(DEFAULT_DECODER_DELAY, 0); |
76 } | 78 } |
77 | 79 |
80 SVDEBUG << "Codec for locale is " << (const char *)(QTextCodec::codecForLocale()->name().data()) << endl; | |
81 | |
78 struct stat stat; | 82 struct stat stat; |
79 if (::stat(m_path.toLocal8Bit().data(), &stat) == -1 || stat.st_size == 0) { | 83 if (::stat(m_path.toLocal8Bit().data(), &stat) == -1 || stat.st_size == 0) { |
80 m_error = QString("File %1 does not exist.").arg(m_path); | 84 m_error = QString("File %1 does not exist.").arg(m_path); |
81 SVDEBUG << "MP3FileReader: " << m_error << endl; | 85 SVDEBUG << "MP3FileReader: " << m_error << endl; |
82 return; | 86 return; |