Mercurial > hg > svcore
comparison data/fileio/ResamplingWavFileReader.cpp @ 327:1d656dcda8ef
* some tweaks to improve usability of these classes in a console application
author | Chris Cannam |
---|---|
date | Fri, 02 Nov 2007 16:50:31 +0000 |
parents | c324d410b096 |
children | 183ee2a55fc7 |
comparison
equal
deleted
inserted
replaced
326:bb6e4c46e202 | 327:1d656dcda8ef |
---|---|
55 | 55 |
56 initialiseDecodeCache(); | 56 initialiseDecodeCache(); |
57 | 57 |
58 if (resampleMode == ResampleAtOnce) { | 58 if (resampleMode == ResampleAtOnce) { |
59 | 59 |
60 m_progress = new QProgressDialog | 60 if (dynamic_cast<QApplication *>(QCoreApplication::instance())) { |
61 (QObject::tr("Resampling %1...").arg(QFileInfo(m_path).fileName()), | 61 m_progress = new QProgressDialog |
62 QObject::tr("Stop"), 0, 100); | 62 (QObject::tr("Resampling %1...").arg(QFileInfo(m_path).fileName()), |
63 m_progress->hide(); | 63 QObject::tr("Stop"), 0, 100); |
64 m_progress->hide(); | |
65 } | |
64 | 66 |
65 size_t blockSize = 16384; | 67 size_t blockSize = 16384; |
66 size_t total = m_original->getFrameCount(); | 68 size_t total = m_original->getFrameCount(); |
67 | 69 |
68 SampleBlock block; | 70 SampleBlock block; |