Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream merge #217

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locale/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -4822,7 +4822,7 @@ msgstr "Herzlich Willkommen zu Sneedacity-Version %s"
#: src/ProjectManager.cpp
#, c-format
msgid "%sSave changes to %s?"
msgstr "%sÄnderungen speichern nach %s?"
msgstr "%sÄnderungen an %s speichern?"

#: src/ProjectManager.cpp
msgid "Save project before closing?"
Expand Down
7 changes: 2 additions & 5 deletions scripts/ci/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ set -euxo pipefail

cd build

cpack -C "${SNEEDACITY_BUILD_TYPE}" --verbose

if [[ "${OSTYPE}" == msys* && ${GIT_BRANCH} == release* ]]; then # Windows
cmake --build . --target innosetup --config "${SNEEDACITY_BUILD_TYPE}"
else
set +e
cpack -C "${SNEEDACITY_BUILD_TYPE}" --verbose ||
(set -e ; echo "build failed, trying one more time" ;
cpack -C "${SNEEDACITY_BUILD_TYPE}" --verbose)
fi

# Remove the temporary directory
Expand Down
16 changes: 8 additions & 8 deletions src/AColor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ void AColor::PreComputeGradient() {
gradient_pre[selected][1][i][2] = (unsigned char) (255 * b);
}

// colorScheme 2: Grayscale
// colorScheme 3: Inverse Grayscale
for (int i = 0; i < gradientSteps; i++) {
float r, g, b;
float value = float(i) / gradientSteps;
Expand Down Expand Up @@ -743,12 +743,12 @@ void AColor::PreComputeGradient() {
b = 1.0f;
break;
}
gradient_pre[selected][2][i][0] = (unsigned char)(255 * r);
gradient_pre[selected][2][i][1] = (unsigned char)(255 * g);
gradient_pre[selected][2][i][2] = (unsigned char)(255 * b);
gradient_pre[selected][3][i][0] = (unsigned char)(255 * r);
gradient_pre[selected][3][i][1] = (unsigned char)(255 * g);
gradient_pre[selected][3][i][2] = (unsigned char)(255 * b);
}

// colorScheme 3: Inv. Grayscale (=Old grayscale)
// colorScheme 2: Grayscale (=Old grayscale)
for (int i = 0; i<gradientSteps; i++) {
float r, g, b;
float value = float(i)/gradientSteps;
Expand Down Expand Up @@ -781,9 +781,9 @@ void AColor::PreComputeGradient() {
b = 1.0f;
break;
}
gradient_pre[selected][3][i][0] = (unsigned char) (255 * r);
gradient_pre[selected][3][i][1] = (unsigned char) (255 * g);
gradient_pre[selected][3][i][2] = (unsigned char) (255 * b);
gradient_pre[selected][2][i][0] = (unsigned char) (255 * r);
gradient_pre[selected][2][i][1] = (unsigned char) (255 * g);
gradient_pre[selected][2][i][2] = (unsigned char) (255 * b);
}
}
}
33 changes: 28 additions & 5 deletions src/float_cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,40 @@

return intgr ;
}
#elif (defined (WIN32) || defined (_WIN32)) && defined(_M_3X64)
#elif (defined (WIN32) || defined (_WIN32)) && defined(_M_X64)

#include <math.h>
#include <immintrin.h>
#include <emmintrin.h>

__inline long int
lrintf (float flt)
#ifdef _MSC_VER
#pragma function(lrint, lrintf)
#endif

__inline
long int lrint(double flt)
{
return _mm_cvt_ss2si(_mm_set_ss(flt));
return _mm_cvtsd_si32(_mm_set_sd(flt));
}

__inline
long int lrintf (float flt)
{
return _mm_cvtss_si32(_mm_set_ss(flt));
}

__inline
long long int llrint(double flt)
{
return _mm_cvtsd_si64(_mm_set_sd(flt));
}

__inline
long long int llrintf(float flt)
{
return _mm_cvtss_si64(_mm_set_ss(flt));
}

#elif (HAVE_LRINT && HAVE_LRINTF)

/* These defines enable functionality introduced with the 1999 ISO C
Expand Down Expand Up @@ -146,6 +169,6 @@
#include <math.h>

#define lrint(dbl) ((int)rint(dbl))
#define lrintf(flt) ((int)rint(flt))
#define lrintf(flt) ((int)rint(flt))

#endif
2 changes: 1 addition & 1 deletion src/prefs/SpectrogramSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void SpectrogramSettings::ColorSchemeEnumSetting::Migrate(wxString &value)
// Migrate old grayscale option to Color scheme choice
bool isGrayscale = (gPrefs->Read(wxT("/Spectrum/Grayscale"), 0L) != 0);
if (isGrayscale && !gPrefs->Read(wxT("/Spectrum/ColorScheme"), &value)) {
value = GetColorSchemeNames().at(csInvGrayscale).Internal();
value = GetColorSchemeNames().at(csGrayscale).Internal();
Write(value);
gPrefs->Flush();
}
Expand Down
4 changes: 2 additions & 2 deletions win/Inno_Setup_Wizard/BuildInnoSetupInstaller.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

if( BUILDING_64_BIT )
set( INSTALLER_SUFFIX "x64" )
set( INSTALLER_X64_MODE "ArchitecturesInstallIn64BitMode=x64")
set( INSTALLER_X64_MODE "ArchitecturesInstallIn64BitMode=x64" )
else()
set( INSTALLER_SUFFIX "x86" )
set( INSTALLER_X64_MODE "ArchitecturesInstallIn64BitMode=x64")
set( INSTALLER_X64_MODE "" )
endif()

if( SIGN )
Expand Down
2 changes: 1 addition & 1 deletion win/Inno_Setup_Wizard/sneedacity.iss.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Source: ".\FirstTimeModel.ini"; DestDir: "{app}"; DestName: "FirstTime.ini"; Per
Source: "Additional\README.txt"; DestDir: "{app}"; Flags: ignoreversion

Source: "Additional\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppExe}"; DestDir: "{app}"; Flags: ignoreversion
Source: "Package\*.exe"; DestDir: "{app}"; Flags: ignoreversion

; Manual, which should be got from the manual wiki using ..\scripts\mw2html_sneedacity\wiki2htm.bat
@MANUAL@
Expand Down