Skip to content
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: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
.idea
.vscode/
/builds
build
/build_overrides.cmake
build.release
build.debug
build.install
build.tooldata
build.qtc
build-*
build
win32build
win32install
win64build
Expand Down
63 changes: 63 additions & 0 deletions buildscripts/cmake/SetupCompilerCache.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# SPDX-License-Identifier: GPL-3.0-only
# MuseScore-Studio-CLA-applies
#
# MuseScore Studio
# Music Composition & Notation
#
# Copyright (C) 2024 MuseScore Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

if (CMAKE_C_COMPILER_LAUNCHER OR CMAKE_CXX_COMPILER_LAUNCHER)
message(WARNING "CMAKE_C_COMPILER_LAUNCHER or CMAKE_CXX_COMPILER_LAUNCHER have already been set; not setting up compiler cache in order not to override them.")
return()
endif()

find_program(COMPILER_CACHE_PROGRAM NAMES ccache sccache buildcache)
if (NOT COMPILER_CACHE_PROGRAM)
message(STATUS "No compiler cache program found")
return()
endif()

if (CMAKE_GENERATOR MATCHES "Make" OR CMAKE_GENERATOR MATCHES "Ninja")
set(CMAKE_C_COMPILER_LAUNCHER "${COMPILER_CACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${COMPILER_CACHE_PROGRAM}")

set(ENV{CCACHE_CPP2} true)
set(ENV{CCACHE_SLOPPINESS} "pch_defines,time_macros")

message(STATUS "Using compiler cache program ${COMPILER_CACHE_PROGRAM} via CMAKE_C_COMPILER_LAUNCHER and CMAKE_CXX_COMPILER_LAUNCHER")
return()
endif()

if (CMAKE_GENERATOR STREQUAL "Xcode")
set(C_LAUNCHER "${COMPILER_CACHE_PROGRAM}")
set(CXX_LAUNCHER "${COMPILER_CACHE_PROGRAM}")
configure_file(${PROJECT_SOURCE_DIR}/buildscripts/tools/launch-c.in launch-c)
configure_file(${PROJECT_SOURCE_DIR}/buildscripts/tools/launch-cxx.in launch-cxx)
execute_process(COMMAND chmod a+rx
"${CMAKE_BINARY_DIR}/launch-c"
"${CMAKE_BINARY_DIR}/launch-cxx"
)

set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c")
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/launch-cxx")
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/launch-c")
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/launch-cxx")

set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_MODULES "NO")
set(CMAKE_XCODE_ATTRIBUTE_COMPILER_INDEX_STORE_ENABLE "NO")

message(STATUS "Using compiler cache program ${COMPILER_CACHE_PROGRAM} with Xcode via wrapper scripts")
return()
endif()
3 changes: 3 additions & 0 deletions framework/audio/common/audiotypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ enum class AudioResourceType {
MuseSamplerSoundPack,
Lv2Plugin,
AudioUnit,
NyquistPlugin
};

static const std::map<AudioResourceType, QString> RESOURCE_TYPE_MAP = {
Expand Down Expand Up @@ -277,6 +278,7 @@ struct AudioFxParams {
case AudioResourceType::Lv2Plugin:
case AudioResourceType::FluidSoundfont:
case AudioResourceType::MuseSamplerSoundPack:
case AudioResourceType::NyquistPlugin:
case AudioResourceType::Undefined: break;
}

Expand Down Expand Up @@ -360,6 +362,7 @@ inline AudioSourceType sourceTypeFromResourceType(AudioResourceType type)
case AudioResourceType::AudioUnit:
case AudioResourceType::Lv2Plugin:
case AudioResourceType::MusePlugin:
case AudioResourceType::NyquistPlugin:
case AudioResourceType::Undefined: break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,11 +590,18 @@ static const auto& mappingByCategory(const mpe::SoundCategory category)
{ { mpe::SoundId::SteelDrums, { mpe::SoundSubCategory::Metal,
mpe::SoundSubCategory::Steel,
mpe::SoundSubCategory::Alto } }, { midi::Program(0, 114) } },
{ { mpe::SoundId::SteelDrums, { mpe::SoundSubCategory::Metal,
mpe::SoundSubCategory::Steel,
mpe::SoundSubCategory::Tenor } }, { midi::Program(0, 114) } },
{ { mpe::SoundId::SteelDrums, { mpe::SoundSubCategory::Metal,
mpe::SoundSubCategory::Steel } }, { midi::Program(0, 114) } },
{ { mpe::SoundId::SteelDrums, { mpe::SoundSubCategory::Metal,
mpe::SoundSubCategory::Steel,
mpe::SoundSubCategory::Tenor } }, { midi::Program(0, 114) } },
mpe::SoundSubCategory::FourPiece } }, { midi::Program(0, 114) } },
{ { mpe::SoundId::SteelDrums, { mpe::SoundSubCategory::Metal,
mpe::SoundSubCategory::Steel,
mpe::SoundSubCategory::Tenor,
mpe::SoundSubCategory::Bass } }, { midi::Program(0, 114) } },
{ { mpe::SoundId::SteelDrums, { mpe::SoundSubCategory::Metal,
mpe::SoundSubCategory::Steel,
mpe::SoundSubCategory::Bass } }, { midi::Program(0, 114) } },
Expand Down
82 changes: 41 additions & 41 deletions framework/audio/thirdparty/lame/lame.bat
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
@echo off
rem ---------------------------------------------
rem PURPOSE:
rem - put this Batch-Command on your Desktop,
rem so you can drag and drop wave files on it
rem and LAME will encode them to mp3 format.
rem - put this Batch-Command in a place mentioned
rem in your PATH environment, start the DOS-BOX
rem and change to a directory where your wave
rem files are located. the following line will
rem encode all your wave files to mp3
rem "lame.bat *.wav"
rem ---------------------------------------------
rem C2000 Robert Hegemann
rem ---------------------------------------------
rem please set LAME and LAMEOPTS
rem LAME - where the executeable is
rem OPTS - options you like LAME to use
set LAME=lame.exe
set OPTS=--preset cd
rem ---------------------------------------------
set thecmd=%LAME% %OPTS%
lfnfor on
:processArgs
if "%1"=="" goto endmark
for %%f in (%1) do %thecmd% "%%f"
if errorlevel 1 goto errormark
shift
goto processArgs
:errormark
echo.
echo.
echo ERROR processing %1
echo.
:endmark
rem
rem finished
rem
@echo off
rem ---------------------------------------------
rem PURPOSE:
rem - put this Batch-Command on your Desktop,
rem so you can drag and drop wave files on it
rem and LAME will encode them to mp3 format.
rem - put this Batch-Command in a place mentioned
rem in your PATH environment, start the DOS-BOX
rem and change to a directory where your wave
rem files are located. the following line will
rem encode all your wave files to mp3
rem "lame.bat *.wav"
rem ---------------------------------------------
rem C2000 Robert Hegemann
rem ---------------------------------------------
rem please set LAME and LAMEOPTS
rem LAME - where the executeable is
rem OPTS - options you like LAME to use

set LAME=lame.exe
set OPTS=--preset cd

rem ---------------------------------------------

set thecmd=%LAME% %OPTS%
lfnfor on
:processArgs
if "%1"=="" goto endmark
for %%f in (%1) do %thecmd% "%%f"
if errorlevel 1 goto errormark
shift
goto processArgs
:errormark
echo.
echo.
echo ERROR processing %1
echo.
:endmark
rem
rem finished
rem
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
@echo off
setlocal enableextensions enabledelayedexpansion
for /f %%v in ('cd "%~dp0.." ^&^& git status ^>NUL 2^>NUL ^&^& git describe --tags --match "v*" --dirty 2^>NUL') do set version=%%v
if not "%version%"=="" set version=!version:~1! && goto :gotversion
if exist "%~dp0..\package_version" goto :getversion
echo Git cannot be found, nor can package_version. Generating unknown version.
set version=unknown
goto :gotversion
:getversion
for /f "delims== tokens=2" %%v in (%~dps0..\package_version) do set version=%%v
set version=!version:"=!
:gotversion
set version=!version: =!
set version_out=#define %~2 "%version%"
echo %version_out%> "%~1_temp"
echo n | comp "%~1_temp" "%~1" > NUL 2> NUL
if not errorlevel 1 goto exit
copy /y "%~1_temp" "%~1"
:exit
del "%~1_temp"
@echo off

setlocal enableextensions enabledelayedexpansion

for /f %%v in ('cd "%~dp0.." ^&^& git status ^>NUL 2^>NUL ^&^& git describe --tags --match "v*" --dirty 2^>NUL') do set version=%%v

if not "%version%"=="" set version=!version:~1! && goto :gotversion

if exist "%~dp0..\package_version" goto :getversion

echo Git cannot be found, nor can package_version. Generating unknown version.

set version=unknown

goto :gotversion

:getversion

for /f "delims== tokens=2" %%v in (%~dps0..\package_version) do set version=%%v
set version=!version:"=!

:gotversion

set version=!version: =!
set version_out=#define %~2 "%version%"

echo %version_out%> "%~1_temp"

echo n | comp "%~1_temp" "%~1" > NUL 2> NUL

if not errorlevel 1 goto exit

copy /y "%~1_temp" "%~1"

:exit

del "%~1_temp"
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ static const std::map<audio::AudioResourceType, std::string> RESOURCE_TYPE_TO_ST
{ audio::AudioResourceType::VstPlugin, "VstPlugin" },
{ audio::AudioResourceType::Lv2Plugin, "Lv2Plugin" },
{ audio::AudioResourceType::AudioUnit, "AudioUnit" },
{ audio::AudioResourceType::NyquistPlugin, "NyquistPlugin" },
};

static JsonObject attributesToJson(const AudioResourceAttributes& attributes)
Expand Down
Loading