void-packages/srcpkgs/amsynth/patches/0002-Fix-size-of-ALSA-audio-buffer.patch
Nathan Owens 56f0652afd amsynth: Add improvement patches
Added patches to fix size of ALSA audio buffer,
static initialization order and a patch for a segfault

Signed-off-by: Nathan Owens <ndowens04@gmail.com>
2019-12-03 13:17:13 +01:00

35 lines
956 B
Diff

From 8d863e4bd86b1ae14ef1eb34b0b58a0609592353 Mon Sep 17 00:00:00 2001
From: Nick Dowell <nick@nickdowell.com>
Date: Fri, 26 Apr 2019 16:05:27 +0100
Subject: [PATCH 2/3] Fix size of ALSA audio buffer
---
src/drivers/ALSAAudioDriver.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git src/drivers/ALSAAudioDriver.cpp src/drivers/ALSAAudioDriver.cpp
index f50e348..68ccf4c 100644
--- src/drivers/ALSAAudioDriver.cpp
+++ src/drivers/ALSAAudioDriver.cpp
@@ -1,7 +1,7 @@
/*
* ALSAAudioDriver.cpp
*
- * Copyright (c) 2001-2015 Nick Dowell
+ * Copyright (c) 2001-2019 Nick Dowell
*
* This file is part of amsynth.
*
@@ -112,7 +112,7 @@ ALSAAudioDriver::open()
_handle = pcm;
_channels = config.channels;
- _buffer = (short *)malloc(kMaxWriteFrames * sizeof(short));
+ _buffer = (short *)malloc(kMaxWriteFrames * _channels * sizeof(short));
config.current_audio_driver = "ALSA";
#ifdef ENABLE_REALTIME
--
2.24.0