diff options
author | Tim E. Real <termtech@rogers.com> | 2012-09-07 01:54:16 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2012-09-07 01:54:16 +0000 |
commit | b77146a529d27e713f89abdb6b526b8048d8943a (patch) | |
tree | 37b397ae84cbf906185c7f9cc00645c8db05a8fc /muse2/muse | |
parent | 3b57e61b68d727a5300722015cfde332b5bd5cdf (diff) |
Feature request 3565102: FLAC audio file import.
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/globals.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/widgets/unusedwavefiles.cpp | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 20c06660..1afea012 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -3208,6 +3208,7 @@ void PartCanvas::viewDropEvent(QDropEvent* event) if (text.endsWith(".wav",Qt::CaseInsensitive) || text.endsWith(".ogg",Qt::CaseInsensitive) || + text.endsWith(".flac",Qt::CaseInsensitive) || text.endsWith(".mpt", Qt::CaseInsensitive) ) { @@ -3224,7 +3225,8 @@ void PartCanvas::viewDropEvent(QDropEvent* event) } if (track->type() == MusECore::Track::WAVE && (text.endsWith(".wav", Qt::CaseInsensitive) || - (text.endsWith(".ogg", Qt::CaseInsensitive)))) + text.endsWith(".ogg", Qt::CaseInsensitive) || + (text.endsWith(".flac", Qt::CaseInsensitive)) )) { unsigned tick = x; MusEGlobal::muse->importWaveToTrack(text, tick, track); diff --git a/muse2/muse/globals.cpp b/muse2/muse/globals.cpp index 967f0870..ec9de587 100644 --- a/muse2/muse/globals.cpp +++ b/muse2/muse/globals.cpp @@ -212,8 +212,8 @@ const char* drum_map_file_save_pattern[] = { }; const char* audio_file_pattern[] = { - QT_TRANSLATE_NOOP("file_patterns", "Wave/Binary (*.wav *.ogg *.bin)"), - QT_TRANSLATE_NOOP("file_patterns", "Wave (*.wav *.ogg)"), + QT_TRANSLATE_NOOP("file_patterns", "Wave/Binary (*.wav *.ogg *.flac *.bin)"), + QT_TRANSLATE_NOOP("file_patterns", "Wave (*.wav *.ogg *.flac)"), QT_TRANSLATE_NOOP("file_patterns", "Binary (*.bin)"), QT_TRANSLATE_NOOP("file_patterns", "All Files (*)"), 0 diff --git a/muse2/muse/widgets/unusedwavefiles.cpp b/muse2/muse/widgets/unusedwavefiles.cpp index a7f2c776..729559fe 100644 --- a/muse2/muse/widgets/unusedwavefiles.cpp +++ b/muse2/muse/widgets/unusedwavefiles.cpp @@ -56,6 +56,7 @@ void UnusedWaveFiles::findWaveFiles() QStringList filter; filter.append("*.wav"); filter.append("*.ogg"); + filter.append("*.flac"); allWaveFiles= dir.entryList(filter); if (!allWaveFiles.count()) return; @@ -75,7 +76,7 @@ void UnusedWaveFiles::findWaveFiles() QTextStream fileContent(fp); while (!fileContent.atEnd()) { QString line = fileContent.readLine(); - if (line.contains(".wav") || line.contains(".ogg")) { // optimization + if (line.contains(".wav") || line.contains(".ogg") || line.contains(".flac")) { // optimization foreach (QString wav, allWaveFiles) { //printf("checking wav [%s]\n", wav.toLatin1().data() ); if (line.contains(wav)) { |