///////////////////////////////////////////////////////////////////////////////
// LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
QRegExp regExp_samplerate("Sample Rate\\s*:\\s*(\\d+)", Qt::CaseInsensitive);
QRegExp regExp_duration("Duration\\s*:\\s*(\\d\\d):(\\d\\d):(\\d\\d)\\.(\\d\\d)", Qt::CaseInsensitive);
QRegExp regExp_channels("Channels\\s*:\\s*(\\d+)", Qt::CaseInsensitive);
+ QRegExp regExp_encoding("Sample Encoding\\s*:\\s*(\\d+)-bit\\s*Float", Qt::CaseInsensitive); //SoX returns a precision of 24-Bit for 32-Bit Float data, so we detect it this way!
while(process.state() != QProcess::NotRunning)
{
if(ok) info->setFormatAudioBitdepth(tmp);
emit statusUpdated(qMin(progress += 25, 100));
}
+ if(regExp_encoding.lastIndexIn(text) >= 0)
+ {
+ bool ok = false;
+ unsigned int tmp = regExp_encoding.cap(1).toUInt(&ok);
+ if(ok) info->setFormatAudioBitdepth((tmp == 32) ? AudioFileModel::BITDEPTH_IEEE_FLOAT32 : tmp);
+ emit statusUpdated(qMin(progress += 25, 100));
+ }
if(regExp_samplerate.lastIndexIn(text) >= 0)
{
bool ok = false;