is this faster?

This commit is contained in:
tildearrow 2023-09-20 00:24:55 -05:00
parent 5211ad1e9a
commit cad63d8351
26 changed files with 87 additions and 27 deletions

View file

@ -296,6 +296,11 @@ jobs:
rmdir orig
rm Furnace-*-Darwin.dmg
if [ -e new/Furnace.app/Contents/Resources/bin/furnace ]; then
rm -v new/Furnace.app/Contents/Resources/bin/furnace
rmdir new/Furnace.app/Contents/Resources/bin
fi
cp -v ../LICENSE new/LICENSE.txt
cp -v ../res/releaseReadme/stable-mac.txt new/README
cp -v -r ../demos new/demos

View file

@ -448,6 +448,9 @@ extern/Nuked-PSG/ympsg.c
extern/opm/opm.c
extern/Nuked-OPLL/opll.c
extern/opl/opl3.c
src/pch.cpp
src/engine/platform/sound/sn76496.cpp
src/engine/platform/sound/ay8910.cpp
src/engine/platform/sound/saa1099.cpp
@ -965,6 +968,21 @@ if (PKG_CONFIG_FOUND AND (SYSTEM_FMT OR SYSTEM_LIBSNDFILE OR SYSTEM_ZLIB OR SYST
endif()
endif()
# why 3.16..... why not 3.0?
if (CMAKE_MAJOR_VERSION GREATER_EQUAL 3 AND CMAKE_MINOR_VERSION GREATER_EQUAL 16)
if (BUILD_GUI)
target_precompile_headers(furnace PUBLIC
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/src/pch.h>
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/extern/imgui_patched/imgui.h>
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/extern/imgui_patched/imgui_internal.h>
)
else()
target_precompile_headers(furnace PUBLIC
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/src/pch.h>
)
endif()
endif()
if (NOT ANDROID OR TERMUX)
if (NOT WIN32 AND NOT APPLE)
include(GNUInstallDirs)

View file

@ -2550,6 +2550,8 @@ struct ImGuiListClipper
// - It is important that we are keeping those disabled by default so they don't leak in user space.
// - This is in order to allow user enabling implicit cast operators between ImVec2/ImVec4 and their own types (using IM_VEC2_CLASS_EXTRA in imconfig.h)
// - You can use '#define IMGUI_DEFINE_MATH_OPERATORS' to import our operators, provided as a courtesy.
#define IMGUI_DEFINE_MATH_OPERATORS
#ifdef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS_IMPLEMENTED
IM_MSVC_RUNTIME_CHECKS_OFF

View file

@ -18,7 +18,6 @@
*/
#include <string.h>
#include <vector>
#include "../ta-log.h"
#include "pa.h"
#ifdef _WIN32

View file

@ -18,7 +18,6 @@
*/
#include <string.h>
#include <vector>
#include "../ta-log.h"
#include "sdlAudio.h"

View file

@ -22,7 +22,7 @@
#include "../ta-utils.h"
#include <memory>
#include "../fixedQueue.h"
#include <vector>
#include "../pch.h"
struct SampleRateChangeEvent {
double rate;

View file

@ -20,7 +20,7 @@
#ifndef _BASEUTILS_H
#define _BASEUTILS_H
#include <string>
#include "pch.h"
std::string taEncodeBase64(const std::string& data);
std::string taDecodeBase64(const char* str);

View file

@ -21,8 +21,6 @@
#define _DIVCONFIG_H
#include "../ta-utils.h"
#include <map>
#include <vector>
#include <initializer_list>
class DivConfig {

View file

@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <vector>
#include "../pch.h"
#include "config.h"
#include "chipUtils.h"

View file

@ -30,13 +30,9 @@
#include "cmdStream.h"
#include "../audio/taAudio.h"
#include "blip_buf.h"
#include <atomic>
#include <functional>
#include <initializer_list>
#include <thread>
#include <mutex>
#include <map>
#include <unordered_map>
#include "../fixedQueue.h"
class DivWorkPool;

View file

@ -22,7 +22,7 @@
#include "song.h"
#include <initializer_list>
#include <vector>
#include "../pch.h"
class DivEngine;

View file

@ -22,7 +22,7 @@
#include "safeWriter.h"
#include "dataErrors.h"
#include "../ta-utils.h"
#include <vector>
#include "../pch.h"
struct DivSong;

View file

@ -18,7 +18,7 @@
*/
#include "safeReader.h"
#include <vector>
#include "../pch.h"
struct DivPattern {
String name;

View file

@ -21,7 +21,6 @@
#include "../engine.h"
#include "../../ta-log.h"
#include <math.h>
#include <map>
#define CHIP_FREQBASE (is219?74448896:12582912)

View file

@ -21,7 +21,6 @@
#include "../engine.h"
#include "../../ta-log.h"
#include <math.h>
#include <map>
#define PITCH_OFFSET ((double)(16*2048*(chanMax+1)))
#define NOTE_ES5506(c,note) (parent->calcBaseFreq(chipClock,chan[c].pcm.freqOffs,note,false))

View file

@ -21,7 +21,6 @@
#include "../engine.h"
#include "../../ta-log.h"
#include <math.h>
#include <map>
#define CHIP_DIVIDER (1248*2)
#define QS_NOTE_FREQUENCY(x) parent->calcBaseFreq(440,4096,(x)-3,false)

View file

@ -21,7 +21,6 @@
#include "../engine.h"
#include "../../ta-log.h"
#include <math.h>
#include <map>
#define CHIP_FREQBASE 25165824

View file

@ -20,7 +20,7 @@
#ifndef _SONG_H
#define _SONG_H
#include <stdio.h>
#include <vector>
#include "../pch.h"
#include "defines.h"
#include "../ta-utils.h"

View file

@ -1,7 +1,7 @@
#include "../ta-utils.h"
#include "imgui.h"
#include <functional>
#include <vector>
#include "../pch.h"
#if defined(_WIN64) || defined(__APPLE__)
#define USE_NFD

View file

@ -28,12 +28,10 @@
#include <SDL.h>
#include <fftw3.h>
#include <initializer_list>
#include <map>
#include <future>
#include <memory>
#include <mutex>
#include <tuple>
#include <vector>
#include "../pch.h"
#include "fileDialog.h"

View file

@ -18,7 +18,7 @@
*/
#include "imgui.h"
#include <string>
#include "../pch.h"
void PlotNoLerp(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float));
void PlotBitfield(const char* label, const int* values, int values_count, int values_offset = 0, const char** overlay_text = NULL, int bits = 8, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float), const bool* values_highlight = NULL, ImVec4 highlightColor = ImVec4(1.0f,1.0f,1.0f,1.0f));

View file

@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdint.h>
#include <string>
#include "pch.h"
#ifdef HAVE_SDL2
#include "SDL_events.h"
#endif

20
src/pch.cpp Normal file
View file

@ -0,0 +1,20 @@
/**
* Furnace Tracker - multi-system chiptune tracker
* Copyright (C) 2021-2023 tildearrow and contributors
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "pch.h"

29
src/pch.h Normal file
View file

@ -0,0 +1,29 @@
/**
* Furnace Tracker - multi-system chiptune tracker
* Copyright (C) 2021-2023 tildearrow and contributors
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef FUR_PCH_H
#define FUR_PCH_H
#include <string>
#include <vector>
#include <mutex>
#include <map>
#include <unordered_map>
#endif

View file

@ -23,8 +23,8 @@
#include <stdarg.h>
#include <time.h>
#include <atomic>
#include <string>
#include <fmt/printf.h>
#include "pch.h"
#define LOGLEVEL_ERROR 0
#define LOGLEVEL_WARN 1

View file

@ -21,7 +21,7 @@
#define _TA_UTILS_H
#include <stdio.h>
#include <string.h>
#include <string>
#include "pch.h"
#ifdef _MSC_VER
#include <BaseTsd.h>