From 10272ca7a40864afe153fc2bf5dcaaf08b564077 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 14 Jul 2022 02:42:21 -0700 Subject: [PATCH] [Audio Processing] Increase thread stack size Apparently, all these new changes with FreeSurround have pushed the default 512KB thread stack size to the limit. And I'm not even using stack variables, really, except for maybe the autoreleasepools. Signed-off-by: Christopher Snowhill --- Audio/Chain/Node.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Audio/Chain/Node.m b/Audio/Chain/Node.m index 7da2c88e6..4849f4838 100644 --- a/Audio/Chain/Node.m +++ b/Audio/Chain/Node.m @@ -211,7 +211,9 @@ } - (void)launchThread { - [NSThread detachNewThreadSelector:@selector(threadEntry:) toTarget:self withObject:nil]; + NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(threadEntry:) object:nil]; + [thread setStackSize:1024 * 1024]; // Dammit, this new code makes the nodes overflow the stack size, so let's double the stack + [thread start]; } - (void)setPreviousNode:(id)p {