comparison data/fileio/OggVorbisFileReader.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 1afaf98dbf11
comparison
equal deleted inserted replaced
326:bb6e4c46e202 327:1d656dcda8ef
68 fish_sound_set_decoded_callback(m_fishSound, acceptFrames, this); 68 fish_sound_set_decoded_callback(m_fishSound, acceptFrames, this);
69 oggz_set_read_callback(m_oggz, -1, readPacket, this); 69 oggz_set_read_callback(m_oggz, -1, readPacket, this);
70 70
71 if (decodeMode == DecodeAtOnce) { 71 if (decodeMode == DecodeAtOnce) {
72 72
73 m_progress = new QProgressDialog 73 if (dynamic_cast<QApplication *>(QCoreApplication::instance())) {
74 (QObject::tr("Decoding %1...").arg(QFileInfo(m_path).fileName()), 74 m_progress = new QProgressDialog
75 QObject::tr("Stop"), 0, 100); 75 (QObject::tr("Decoding %1...").arg(QFileInfo(m_path).fileName()),
76 m_progress->hide(); 76 QObject::tr("Stop"), 0, 100);
77 m_progress->hide();
78 }
77 79
78 while (oggz_read(m_oggz, 1024) > 0); 80 while (oggz_read(m_oggz, 1024) > 0);
79 81
80 fish_sound_delete(m_fishSound); 82 fish_sound_delete(m_fishSound);
81 m_fishSound = 0; 83 m_fishSound = 0;