let's try console

This commit is contained in:
tildearrow 2023-02-14 01:02:35 -05:00
parent 9cdc330a48
commit 8313d0f518
3 changed files with 33 additions and 4 deletions

View file

@ -400,6 +400,7 @@ src/engine/platform/sound/c64/wave8580_PST.cc
src/engine/platform/sound/c64/wave8580_P_T.cc
src/engine/platform/sound/c64/wave8580__ST.cc
src/engine/platform/sound/c64_fp/array.cpp
src/engine/platform/sound/c64_fp/Dac.cpp
src/engine/platform/sound/c64_fp/EnvelopeGenerator.cpp
src/engine/platform/sound/c64_fp/ExternalFilter.cpp
@ -763,9 +764,7 @@ if (WARNINGS_ARE_ERRORS)
)
endif()
if (WIN32)
add_executable(furnace WIN32 ${USED_SOURCES})
elseif(ANDROID AND NOT TERMUX)
if(ANDROID AND NOT TERMUX)
add_library(furnace SHARED ${USED_SOURCES})
else()
add_executable(furnace ${USED_SOURCES})

View file

@ -0,0 +1,26 @@
/*
* This file is part of a modification to libsidplayfp, a SID player engine.
* The applied modification fixes compilation under recent version of GCC,
* which have tougher warnings against memory access problems.
*
* Copyright (C) 2011-2014 Leandro Nini
* Copyright (C) 2023 tildearrow
*
* 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 "array.h"
std::mutex counterOps;

View file

@ -21,6 +21,10 @@
#ifndef ARRAY_H
#define ARRAY_H
#include <mutex>
extern std::mutex counterOps;
/**
* Counter.
*/
@ -59,7 +63,7 @@ public:
x(p.x),
y(p.y) { count->increase(); }
~matrix() { if (count->decrease() == 0) { delete count; delete [] data; } }
~matrix() { counterOps.lock(); if (count->decrease() == 0) { delete count; delete [] data; } counterOps.unlock(); }
unsigned int length() const { return x * y; }