From c1c21ec84f673182aba8d06a9ad5d7f08e2519ae Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Tue, 28 Dec 2021 16:04:16 -0800 Subject: [PATCH] Hopefully fix glitching on seeking --- Audio/Chain/InputNode.m | 3 +-- Audio/Chain/OutputNode.h | 1 - Audio/Chain/OutputNode.m | 7 ------- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Audio/Chain/InputNode.m b/Audio/Chain/InputNode.m index 34fc976cb..ae1dff443 100644 --- a/Audio/Chain/InputNode.m +++ b/Audio/Chain/InputNode.m @@ -121,12 +121,11 @@ { if (shouldSeek == YES) { - OutputNode *output = [[controller controller] output]; ConverterNode *converter = [[[controller controller] bufferChain] converter]; DLog(@"SEEKING! Resetting Buffer"); + amountInBuffer = 0; [self resetBuffer]; - [output reset]; [converter resetBuffer]; [converter inputFormatDidChange:[[[controller controller] bufferChain] inputFormat]]; diff --git a/Audio/Chain/OutputNode.h b/Audio/Chain/OutputNode.h index 2b51c7aa7..e325dd352 100644 --- a/Audio/Chain/OutputNode.h +++ b/Audio/Chain/OutputNode.h @@ -30,7 +30,6 @@ - (void)process; - (void)close; - (void)seek:(double)time; -- (void)reset; - (int)readData:(void *)ptr amount:(int)amount; diff --git a/Audio/Chain/OutputNode.m b/Audio/Chain/OutputNode.m index 9662752ff..61552b20f 100644 --- a/Audio/Chain/OutputNode.m +++ b/Audio/Chain/OutputNode.m @@ -51,13 +51,6 @@ [output resume]; } -- (void)reset -{ - [output setup]; - if (!paused) - [output start]; -} - - (int)readData:(void *)ptr amount:(int)amount { @autoreleasepool {