comparison data/fileio/MP3FileReader.cpp @ 186:06ad01f3e553

* Add system-specific LADSPA and DSSI plugin paths (for OS/X and Windows) * Add ability to open more than one audio file at once from the command line * Add plugin input source selection (with some caveats) * Show name of file being decoded in Ogg/mp3 decode progress dialog
author Chris Cannam
date Thu, 12 Oct 2006 14:56:28 +0000
parents c03ec31005e1
children f02989f7e160
comparison
equal deleted inserted replaced
185:d5052b5fea9c 186:06ad01f3e553
24 #include <fcntl.h> 24 #include <fcntl.h>
25 25
26 #include <iostream> 26 #include <iostream>
27 27
28 #include <QApplication> 28 #include <QApplication>
29 #include <QFileInfo>
29 #include <QProgressDialog> 30 #include <QProgressDialog>
30 31
31 MP3FileReader::MP3FileReader(QString path, bool showProgress, CacheMode mode) : 32 MP3FileReader::MP3FileReader(QString path, bool showProgress, CacheMode mode) :
32 CodedAudioFileReader(mode), 33 CodedAudioFileReader(mode),
33 m_path(path) 34 m_path(path)
74 75
75 ::close(fd); 76 ::close(fd);
76 77
77 if (showProgress) { 78 if (showProgress) {
78 m_progress = new QProgressDialog 79 m_progress = new QProgressDialog
79 (QObject::tr("Decoding MP3 file..."), 80 (QObject::tr("Decoding %1...").arg(QFileInfo(path).fileName()),
80 QObject::tr("Stop"), 0, 100); 81 QObject::tr("Stop"), 0, 100);
81 m_progress->hide(); 82 m_progress->hide();
82 } 83 }
83 84
84 if (!decode(filebuffer, stat.st_size)) { 85 if (!decode(filebuffer, stat.st_size)) {