diff --git a/Audio/Chain/BufferChain.m b/Audio/Chain/BufferChain.m index b0dba6de0..478d14adb 100644 --- a/Audio/Chain/BufferChain.m +++ b/Audio/Chain/BufferChain.m @@ -51,10 +51,10 @@ id source = [AudioSource audioSourceForURL:url]; DLog(@"Opening: %@", url); - if (![source open:url]) + if (!source || ![source open:url]) { DLog(@"Couldn't open source..."); - url = [NSURL URLWithString:@"silence://1"]; + url = [NSURL URLWithString:@"silence://10"]; source = [AudioSource audioSourceForURL:url]; if (![source open:url]) return NO; diff --git a/Plugins/SilenceDecoder/SilenceDecoder/SilenceDecoder.m b/Plugins/SilenceDecoder/SilenceDecoder/SilenceDecoder.m index 91fdde348..991f8bcda 100755 --- a/Plugins/SilenceDecoder/SilenceDecoder/SilenceDecoder.m +++ b/Plugins/SilenceDecoder/SilenceDecoder/SilenceDecoder.m @@ -23,7 +23,10 @@ enum { channels = 2 }; NSString * path = [[[s url] relativeString] substringFromIndex:10]; - length = [path intValue] * sample_rate; + int seconds = [path intValue]; + if (!seconds) seconds = 10; + + length = seconds * sample_rate; remain = length; [self willChangeValueForKey:@"properties"];