Merge branch 'master' into dev-gain-structure

pull/4/head
Alexander Diamadis 4 years ago
commit 510949b059

1
.gitignore vendored

@ -4,3 +4,4 @@ build*
/installer/packages/com.dkmtech.pacalculator/data/* /installer/packages/com.dkmtech.pacalculator/data/*
*.exe *.exe
*.app *.app
*.dmg

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>PA Calculator</Name>
<Version>1.2.0</Version>
<Title>PA Calculator Installer</Title>
<Publisher>DKM-Tech</Publisher>
<StartMenuDir>DKM-Tech</StartMenuDir>
<TargetDir>@ApplicationsDir@/PA Calculator</TargetDir>
</Installer>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Installer> <Installer>
<Name>PA Calculator</Name> <Name>PA Calculator</Name>
<Version>1.1.0</Version> <Version>1.2.0</Version>
<Title>PA Calculator Installer</Title> <Title>PA Calculator Installer</Title>
<Publisher>DKM-Tech</Publisher> <Publisher>DKM-Tech</Publisher>
<StartMenuDir>DKM-Tech</StartMenuDir> <StartMenuDir>DKM-Tech</StartMenuDir>

@ -0,0 +1,26 @@
#!/bin/sh
releaseFolder=$(find ../ -path "*-Release" -type d)
fileName="${releaseFolder}/PA Calculator.app"
if [[ -e $fileName ]]; then
rm -rf "PA Calculator.app"
rm -rf "Install PA Calculator.app"
rm -rf setup64bit.dmg
cp -R "${fileName}" "PA Calculator.app"
macdeployqt 'PA Calculator.app'
VERSION=$(grep VERSION= "../source/PA_Calculator.pro" | awk -F= '{print $2;exit}')
echo "verwendet Version $VERSION"
DATE=$(date +%F)
sed -i '' 's/<Version>.*<\/Version>/<Version>'"$VERSION"'<\/Version>/g' packages/com.dkmtech.pacalculator/meta/package.xml
sed -i '' 's/<ReleaseDate>.*<\/ReleaseDate>/<ReleaseDate>'"$DATE"'<\/ReleaseDate>/g' packages/com.dkmtech.pacalculator/meta/package.xml
rm -rf packages/com.dkmtech.pacalculator/data
mkdir packages/com.dkmtech.pacalculator/data
cp -R 'PA Calculator.app' 'packages/com.dkmtech.pacalculator/data/PA Calculator.app'
binarycreator -c config/config_mac.xml -p packages 'Install PA Calculator'
rm -rf 'PA Calculator.app'
hdiutil create -srcfolder "Install PA Calculator.app" setup64bit.dmg
rm -rf "Install PA Calculator.app"
echo "Done"
else
echo "Could not find PA Calculator.app. Please build it first!"
fi

@ -0,0 +1,20 @@
@echo off
del /s /q setup64bit.exe
echo "Ändern Sie alle notwendigen Einstellungen!"
packages\com.dkmtech.pacalculator\meta\package.xml
cd ..
FOR /F "tokens=* USEBACKQ" %%F IN (`dir /b *-Release`) DO (
set releaseFolder=%%F
)
cd %releaseFolder%\Release
del /s /q ..\..\installer\packages\com.dkmtech.pacalculator\data\*
mkdir ..\..\installer\packages\com.dkmtech.pacalculator\data\setup
copy "PA Calculator.exe" "..\..\installer\packages\com.dkmtech.pacalculator\data\setup\PA Calculator.exe"
cd ..\..\installer\packages\com.dkmtech.pacalculator\data\setup
windeployqt --translations de,en "PA Calculator.exe"
7z a -r ../setup *
cd ..
rmdir /s /q setup
cd ..\..\..\
binarycreator -c config\config_win.xml -p packages setup64bit.exe
del /s packages\com.dkmtech.pacalculator\data\setup.7z

@ -6,5 +6,5 @@
<ReleaseDate>2022-02-06</ReleaseDate> <ReleaseDate>2022-02-06</ReleaseDate>
<Name>com.dkmtech.installer</Name> <Name>com.dkmtech.installer</Name>
<Virtual>true</Virtual> <Virtual>true</Virtual>
<UpdateText>First Installer</UpdateText> <UpdateText>DKM-Teh Installer</UpdateText>
</Package> </Package>

@ -11,8 +11,8 @@ Component.prototype.createOperations = function()
try { try {
var userProfile = installer.environmentVariable("USERPROFILE"); var userProfile = installer.environmentVariable("USERPROFILE");
installer.setValue("UserProfile", userProfile); installer.setValue("UserProfile", userProfile);
component.addOperation("CreateShortcut", "@TargetDir@\\PA_Calculator.exe", "@UserProfile@\\Desktop\\PA Calculator.lnk"); component.addOperation("CreateShortcut", "@TargetDir@\\PA Calculator.exe", "@UserProfile@\\Desktop\\PA Calculator.lnk");
component.addOperation("CreateShortcut", "@TargetDir@\\PA_Calculator.exe", "@StartMenuDir@/PA Calculator.lnk","workingDirectory=@TargetDir@","description=Start PA-Calculator"); component.addOperation("CreateShortcut", "@TargetDir@\\PA Calculator.exe", "@StartMenuDir@/PA Calculator.lnk","workingDirectory=@TargetDir@","description=Start PA-Calculator");
} catch (e) { } catch (e) {
// Do nothing if key doesn't exist // Do nothing if key doesn't exist
} }

@ -2,8 +2,8 @@
<Package> <Package>
<DisplayName>PA-Calculator</DisplayName> <DisplayName>PA-Calculator</DisplayName>
<Description>Install PA-Calculator</Description> <Description>Install PA-Calculator</Description>
<Version>1.1</Version> <Version>1.2.0</Version>
<ReleaseDate>2022-02-06</ReleaseDate> <ReleaseDate>2022-02-20</ReleaseDate>
<Licenses> <Licenses>
<License name="GNU GENERAL PUBLIC LICENSE" file="license.txt" /> <License name="GNU GENERAL PUBLIC LICENSE" file="license.txt" />
</Licenses> </Licenses>

@ -55,7 +55,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
RESOURCES += \ RESOURCES += \
resources.qrc resources.qrc
VERSION=1.1.0 VERSION=1.2.0
QMAKE_TARGET_PRODUCT = "PA-Calculator" QMAKE_TARGET_PRODUCT = "PA-Calculator"
QMAKE_TARGET_COMPANY = "DKM-Tech" QMAKE_TARGET_COMPANY = "DKM-Tech"
QMAKE_TARGET_COPYRIGHT = "Copyright (c) 2022 by Alexander Diamadis" QMAKE_TARGET_COPYRIGHT = "Copyright (c) 2022 by Alexander Diamadis"

@ -45,11 +45,11 @@ void analyzer::on_pushButton_calculate_clicked()
delete [] songList; delete [] songList;
} }
countSongs=0; countSongs=0;
QDirIterator it_counter(ui->lineEdit_path->text(), {"*.mp3", "*.wav", "*.flac", "*.ogg"}, QDir::NoFilter, QDirIterator::Subdirectories); QDirIterator it_counter(ui->lineEdit_path->text(), {"*.mp3", "*.wav", "*.flac", "*.ogg" ,"*.opus", "*.wv", "*.mpc"}, QDir::NoFilter, QDirIterator::Subdirectories);
while (it_counter.next()!="") { while (it_counter.next()!="") {
countSongs+=1; countSongs+=1;
} }
QDirIterator it(ui->lineEdit_path->text(), {"*.mp3", "*.wav"}, QDir::NoFilter, QDirIterator::Subdirectories); QDirIterator it(ui->lineEdit_path->text(), {"*.mp3", "*.wav", "*.flac", "*.ogg" ,"*.opus", "*.wv", "*.mpc"}, QDir::NoFilter, QDirIterator::Subdirectories);
unsigned int k=0; unsigned int k=0;
songList=new csong[countSongs]; songList=new csong[countSongs];
float preferedLoudness=ui->doubleSpinBox_preferredLoudness->value(); float preferedLoudness=ui->doubleSpinBox_preferredLoudness->value();

@ -85,7 +85,6 @@ void csong::analyze(float preferedLoudness)
m_loudness=loudness[0]; m_loudness=loudness[0];
m_widgetItem[1].setData(Qt::EditRole,QVariant(m_loudness)); m_widgetItem[1].setData(Qt::EditRole,QVariant(m_loudness));
m_peakLevel=0; m_peakLevel=0;
for (unsigned int i=0;i<fileData->samples.size();i++){ for (unsigned int i=0;i<fileData->samples.size();i++){
if (abs(fileData->samples[i])>m_peakLevel){ if (abs(fileData->samples[i])>m_peakLevel){
@ -110,19 +109,27 @@ void csong::analyze(float preferedLoudness)
} }
} catch (const UnsupportedExtensionEx & e) } catch (const UnsupportedExtensionEx & e)
{ {
std::cerr << "Caught: " << e.what() << std::endl; //std::cerr << "Caught: " << e.what() << std::endl;
m_widgetItem[1].setText("Nicht unterstützte Dateiendung!");
m_widgetItem[2].setText("-");
m_widgetItem[3].setText("-");
m_widgetItem[4].setText("-");
} }
catch (const LoadPathNotImplEx & e) catch (const LoadPathNotImplEx & e)
{ {
std::cerr << "Caught: " << e.what() << std::endl; //std::cerr << "Caught: " << e.what() << std::endl;
} }
catch (const LoadBufferNotImplEx & e) catch (const LoadBufferNotImplEx & e)
{ {
std::cerr << "Caught: " << e.what() << std::endl; //std::cerr << "Caught: " << e.what() << std::endl;
} }
catch (const std::exception & e) catch (const std::exception & e)
{ {
std::cerr << "Caught: " << e.what() << std::endl; //std::cerr << "Caught: " << e.what() << std::endl;
m_widgetItem[1].setText("Nicht unterstützter Codec!");
m_widgetItem[2].setText("-");
m_widgetItem[3].setText("-");
m_widgetItem[4].setText("-");
} }
} }

@ -115,8 +115,11 @@ void MainWindow::on_pushButton_requestLimiter_clicked()
}else if (vAmpsens_dBu<vMaxAmpInPeak){ }else if (vAmpsens_dBu<vMaxAmpInPeak){
QMessageBox msgBox(QMessageBox::Warning,"Amplifier can't deliver maximum peak power","The maximum power level of the amplifier is below the maximum peak power level of the speaker. To protect the speaker from a distorted signal the amplifier might deliver, a peak limiter is required with the amplifiers input sensitivty set as its threshold."); QMessageBox msgBox(QMessageBox::Warning,"Amplifier can't deliver maximum peak power","The maximum power level of the amplifier is below the maximum peak power level of the speaker. To protect the speaker from a distorted signal the amplifier might deliver, a peak limiter is required with the amplifiers input sensitivty set as its threshold.");
msgBox.exec(); msgBox.exec();
if (QString::number(thresholdRMS,'f',1)==QString::number(-18-(ui->spinBox_digitalNominalLevel->value()-vAmpsens_dBu),'f',1)){
ui->label_thresholdRMS->setText(QString::number(thresholdRMS,'f',1)+QString(" dBFS")); ui->label_thresholdRMS->setText(QString("not required"));
}else{
ui->label_thresholdRMS->setText(QString::number(thresholdRMS,'f',1)+QString(" dBFS"));
}
ui->label_attackTimeRMS->setText(QString::number(attackTimeRMS,'f',2)+QString(" ms")); ui->label_attackTimeRMS->setText(QString::number(attackTimeRMS,'f',2)+QString(" ms"));
ui->label_releaseTimeRMS->setText(QString::number(releaseTimeRMS,'f',2)+QString(" ms")); ui->label_releaseTimeRMS->setText(QString::number(releaseTimeRMS,'f',2)+QString(" ms"));
ui->label_UMaxSpeakerInRMS->setText(QString::number(vMaxSpeakerInRMS,'f',2)+QString(" dBU (")+QString::number(qSqrt(speakerImp*speakerRMS),'f',2)+QString(" V)")); ui->label_UMaxSpeakerInRMS->setText(QString::number(vMaxSpeakerInRMS,'f',2)+QString(" dBU (")+QString::number(qSqrt(speakerImp*speakerRMS),'f',2)+QString(" V)"));

Loading…
Cancel
Save