Mercurial > hg > svcore
comparison data/fileio/MP3FileReader.cpp @ 1313:ff9697592bef 3.0-integration
Add gapless preference to prefs dialog; much work on audio read tests
author | Chris Cannam |
---|---|
date | Thu, 01 Dec 2016 17:45:40 +0000 |
parents | 079e553dc16e |
children | 4cd64fc573f3 |
comparison
equal
deleted
inserted
replaced
1312:079e553dc16e | 1313:ff9697592bef |
---|---|
69 m_mp3FrameCount = 0; | 69 m_mp3FrameCount = 0; |
70 m_completion = 0; | 70 m_completion = 0; |
71 m_done = false; | 71 m_done = false; |
72 m_reporter = reporter; | 72 m_reporter = reporter; |
73 | 73 |
74 if (m_gaplessMode == Gapless) { | 74 if (m_gaplessMode == GaplessMode::Gapless) { |
75 CodedAudioFileReader::setFramesToTrim(DEFAULT_DECODER_DELAY, 0); | 75 CodedAudioFileReader::setFramesToTrim(DEFAULT_DECODER_DELAY, 0); |
76 } | 76 } |
77 | 77 |
78 struct stat stat; | 78 struct stat stat; |
79 if (::stat(m_path.toLocal8Bit().data(), &stat) == -1 || stat.st_size == 0) { | 79 if (::stat(m_path.toLocal8Bit().data(), &stat) == -1 || stat.st_size == 0) { |
395 if (m_mp3FrameCount > 0) { | 395 if (m_mp3FrameCount > 0) { |
396 // only handle info frame if it appears as first mp3 frame | 396 // only handle info frame if it appears as first mp3 frame |
397 return MAD_FLOW_CONTINUE; | 397 return MAD_FLOW_CONTINUE; |
398 } | 398 } |
399 | 399 |
400 if (m_gaplessMode == Gappy) { | 400 if (m_gaplessMode == GaplessMode::Gappy) { |
401 // Our non-gapless mode does not even filter out the Xing/LAME | 401 // Our non-gapless mode does not even filter out the Xing/LAME |
402 // frame. That's because the main reason non-gapless mode | 402 // frame. That's because the main reason non-gapless mode |
403 // exists is for backward compatibility with MP3FileReader | 403 // exists is for backward compatibility with MP3FileReader |
404 // behaviour before the gapless support was added, so we even | 404 // behaviour before the gapless support was added, so we even |
405 // need to keep the spurious 1152 samples resulting from | 405 // need to keep the spurious 1152 samples resulting from |