You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
soundkonverter/src/conversionoptions.cpp

87 lines
3.3 KiB

#include "conversionoptions.h"
ConversionOptions::ConversionOptions() // TODO reset all values
{}
ConversionOptions::~ConversionOptions()
{}
bool ConversionOptions::nearlyEqual( const ConversionOptions& other )
{
if( encodingOptions.sFormat != other.encodingOptions.sFormat ||
encodingOptions.sQualityMode != other.encodingOptions.sQualityMode ||
encodingOptions.iQuality != other.encodingOptions.iQuality ||
encodingOptions.sBitrateMode != other.encodingOptions.sBitrateMode ||
encodingOptions.bBitrateRange != other.encodingOptions.bBitrateRange ||
encodingOptions.samplingRate.bEnabled != other.encodingOptions.samplingRate.bEnabled ||
encodingOptions.channels.bEnabled != other.encodingOptions.channels.bEnabled ||
encodingOptions.replaygain.bEnabled != other.encodingOptions.replaygain.bEnabled ||
encodingOptions.sInOutFiles != other.encodingOptions.sInOutFiles ) {
return false;
}
if( encodingOptions.bBitrateRange ) {
if( encodingOptions.iMinBitrate != other.encodingOptions.iMinBitrate ||
encodingOptions.iMaxBitrate != other.encodingOptions.iMaxBitrate ) {
return false;
}
}
if( encodingOptions.samplingRate.bEnabled ) {
if( encodingOptions.samplingRate.iSamplingRate != other.encodingOptions.samplingRate.iSamplingRate ) {
return false;
}
}
if( encodingOptions.channels.bEnabled ) {
if( encodingOptions.channels.sChannels != other.encodingOptions.channels.sChannels ) {
return false;
}
}
if( outputOptions.mode != other.outputOptions.mode ||
outputOptions.directory != other.outputOptions.directory ) {
return false;
}
return true;
}
/*bool ConversionOptions::nearlyEqual( ConversionOptions* other )
{
if( encodingOptions.sFormat != other->encodingOptions.sFormat ||
encodingOptions.sQualityMode != other->encodingOptions.sQualityMode ||
encodingOptions.iQuality != other->encodingOptions.iQuality ||
encodingOptions.sBitrateMode != other->encodingOptions.sBitrateMode ||
encodingOptions.bBitrateRange != other->encodingOptions.bBitrateRange ||
encodingOptions.samplingRate.bEnabled != other->encodingOptions.samplingRate.bEnabled ||
encodingOptions.channels.bEnabled != other->encodingOptions.channels.bEnabled ||
encodingOptions.replaygain.bEnabled != other->encodingOptions.replaygain.bEnabled ||
encodingOptions.sInOutFiles != other->encodingOptions.sInOutFiles ) {
return false;
}
if( encodingOptions.bBitrateRange ) {
if( encodingOptions.iMinBitrate != other->encodingOptions.iMinBitrate ||
encodingOptions.iMaxBitrate != other->encodingOptions.iMaxBitrate ) {
return false;
}
}
if( encodingOptions.samplingRate.bEnabled ) {
if( encodingOptions.samplingRate.iSamplingRate != other->encodingOptions.samplingRate.iSamplingRate ) {
return false;
}
}
if( encodingOptions.channels.bEnabled ) {
if( encodingOptions.channels.sChannels != other->encodingOptions.channels.sChannels ) {
return false;
}
}
if( outputOptions.mode != other->outputOptions.mode ||
outputOptions.directory != other->outputOptions.directory ) {
return false;
}
return true;
}*/