mirror of
https://github.com/dwhinham/mt32-pi.git
synced 2026-10-27 06:21:59 +00:00
Update to circle-stdlib v15.5/Circle Step 43.2
This commit is contained in:
1 parent
35012b67ef
commit
f1cfa91dce
5 files changed
+2
-91
No files matched your search
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Update to GeneralUser GS v1.511.
|
||||
* This is a currently-unpublished version from the author, who has made several important fixes to the SoundFont to improve compatibility with FluidSynth v2.1.0+.
|
||||
- Update to circle-stdlib v15.5/Circle Step 43.2.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
@@ -15,10 +15,6 @@ $(CIRCLE_STDLIB_CONFIG) $(CIRCLE_CONFIG)&:
|
||||
@echo "Configuring for Raspberry Pi $(RASPBERRYPI) ($(BITS) bit)"
|
||||
$(CIRCLESTDLIBHOME)/configure --raspberrypi=$(RASPBERRYPI) --prefix=$(PREFIX)
|
||||
|
||||
# Apply patches
|
||||
@patch -N -p1 --no-backup-if-mismatch -r - -d $(CIRCLEHOME) < patches/circle-43.1-queue-alloc-frames.patch
|
||||
@patch -N -p1 --no-backup-if-mismatch -r - -d $(CIRCLEHOME) < patches/circle-43.1-fast-path-same-formats.patch
|
||||
|
||||
# Enable multi-core
|
||||
echo "DEFINE += -DARM_ALLOW_MULTI_CORE" >> $(CIRCLE_CONFIG)
|
||||
|
||||
@@ -118,8 +114,6 @@ clean:
|
||||
#
|
||||
veryclean: clean
|
||||
# Reverse patches
|
||||
@patch -R -N -p1 --no-backup-if-mismatch -r - -d $(CIRCLEHOME) < patches/circle-43.1-fast-path-same-formats.patch
|
||||
@patch -R -N -p1 --no-backup-if-mismatch -r - -d $(CIRCLEHOME) < patches/circle-43.1-queue-alloc-frames.patch
|
||||
@patch -R -N -p1 -r - -d $(FLUIDSYNTHHOME) < patches/fluidsynth-2.1.5-circle.patch
|
||||
|
||||
# Clean circle-stdlib
|
||||
|
||||
Vendored
+1
-1
Submodule external/circle-stdlib updated: 965b9f682f...fdb3c4a948.
@@ -1,28 +0,0 @@
|
||||
From d7df6d436403c8b997a7990e825f198a2a634de3 Mon Sep 17 00:00:00 2001
|
||||
From: Dale Whinham <dwhinham@users.noreply.github.com>
|
||||
Date: Tue, 10 Nov 2020 08:29:49 +0000
|
||||
Subject: [PATCH] soundbasedevice: Allow fast path for same formats (#157)
|
||||
|
||||
---
|
||||
lib/soundbasedevice.cpp | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/soundbasedevice.cpp b/lib/soundbasedevice.cpp
|
||||
index a925c182..e23f5dc8 100644
|
||||
--- a/lib/soundbasedevice.cpp
|
||||
+++ b/lib/soundbasedevice.cpp
|
||||
@@ -147,12 +147,11 @@ int CSoundBaseDevice::Write (const void *pBuffer, size_t nCount)
|
||||
|
||||
m_SpinLock.Acquire ();
|
||||
|
||||
- if ( m_HWFormat == SoundFormatSigned16
|
||||
- && m_WriteFormat == SoundFormatSigned16
|
||||
+ if ( m_HWFormat == m_WriteFormat
|
||||
&& m_nWriteChannels == SOUND_HW_CHANNELS
|
||||
&& !m_bSwapChannels)
|
||||
{
|
||||
- // fast path for SoundFormatSigned16 Stereo without conversion
|
||||
+ // fast path for Stereo samples without bit depth conversion or channel swapping
|
||||
|
||||
unsigned nBytes = GetQueueBytesFree ();
|
||||
if (nBytes > nCount)
|
||||
@@ -1,56 +0,0 @@
|
||||
From fbe8320f65524bc7bf4afe225901b75cb43b3c7e Mon Sep 17 00:00:00 2001
|
||||
From: Dale Whinham <dwhinham@users.noreply.github.com>
|
||||
Date: Tue, 10 Nov 2020 08:32:33 +0000
|
||||
Subject: [PATCH] soundbasedevice: Allow queue allocation in frames (#158)
|
||||
|
||||
---
|
||||
include/circle/soundbasedevice.h | 5 +++++
|
||||
lib/soundbasedevice.cpp | 19 +++++++++++++++++++
|
||||
2 files changed, 24 insertions(+)
|
||||
|
||||
diff --git a/include/circle/soundbasedevice.h b/include/circle/soundbasedevice.h
|
||||
index f3facb1a..844df336 100644
|
||||
--- a/include/circle/soundbasedevice.h
|
||||
+++ b/include/circle/soundbasedevice.h
|
||||
@@ -84,6 +84,11 @@ class CSoundBaseDevice : public CDevice /// Base class of sound devices
|
||||
/// \note Not used, if GetChunk() is overloaded.
|
||||
boolean AllocateQueue (unsigned nSizeMsecs);
|
||||
|
||||
+ /// \brief Allocate the queue used for Write()
|
||||
+ /// \param nSizeMsecs Size of the queue in frames of audio
|
||||
+ /// \note Not used, if GetChunk() is overloaded.
|
||||
+ boolean AllocateQueueFrames (unsigned nSizeFrames);
|
||||
+
|
||||
/// \param Format Format of sound data used for Write()
|
||||
/// \param nChannels 1 or 2 channels
|
||||
/// \note Not used, if GetChunk() is overloaded.
|
||||
diff --git a/lib/soundbasedevice.cpp b/lib/soundbasedevice.cpp
|
||||
index e23f5dc8..b156239b 100644
|
||||
--- a/lib/soundbasedevice.cpp
|
||||
+++ b/lib/soundbasedevice.cpp
|
||||
@@ -106,6 +106,25 @@ boolean CSoundBaseDevice::AllocateQueue (unsigned nSizeMsecs)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+boolean CSoundBaseDevice::AllocateQueueFrames (unsigned nSizeFrames)
|
||||
+{
|
||||
+ assert (m_pQueue == 0);
|
||||
+ assert (1 <= nSizeFrames && nSizeFrames <= m_nSampleRate);
|
||||
+
|
||||
+ // 1 byte remains free
|
||||
+ m_nQueueSize = m_nHWFrameSize*nSizeFrames + 1;
|
||||
+
|
||||
+ m_pQueue = new u8[m_nQueueSize];
|
||||
+ if (m_pQueue == 0)
|
||||
+ {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ m_nNeedDataThreshold = m_nQueueSize / 2;
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
void CSoundBaseDevice::SetWriteFormat (TSoundFormat Format, unsigned nChannels)
|
||||
{
|
||||
assert (Format < SoundFormatUnknown);
|
||||
Reference in new issue
Block a user