Fixed handling ReplayGain info on automatic track changes
parent
2837b12d32
commit
cdafef8a9c
|
@ -77,7 +77,7 @@
|
|||
bufferChain = [[BufferChain alloc] initWithController:self];
|
||||
[self notifyStreamChanged:userInfo];
|
||||
|
||||
while (![bufferChain open:url withOutputFormat:[output format]])
|
||||
while (![bufferChain open:url withOutputFormat:[output format] withRGInfo:rgi])
|
||||
{
|
||||
[bufferChain release];
|
||||
bufferChain = nil;
|
||||
|
@ -99,7 +99,6 @@
|
|||
}
|
||||
|
||||
[bufferChain setUserInfo:userInfo];
|
||||
[bufferChain setRGInfo:rgi];
|
||||
|
||||
[self setShouldContinue:YES];
|
||||
|
||||
|
@ -256,7 +255,7 @@
|
|||
&& [[nextStream path] isEqualToString:[[lastChain streamURL] path]])
|
||||
{
|
||||
if ([lastChain setTrack:nextStream]
|
||||
&& [newChain openWithInput:[lastChain inputNode] withOutputFormat:[output format]])
|
||||
&& [newChain openWithInput:[lastChain inputNode] withOutputFormat:[output format] withRGInfo:nextStreamRGInfo])
|
||||
{
|
||||
[newChain setStreamURL:nextStream];
|
||||
[newChain setUserInfo:nextStreamUserInfo];
|
||||
|
@ -270,7 +269,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
while (![newChain open:nextStream withOutputFormat:[output format]])
|
||||
while (![newChain open:nextStream withOutputFormat:[output format] withRGInfo:nextStreamRGInfo])
|
||||
{
|
||||
if (nextStream == nil)
|
||||
{
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
- (id)initWithController:(id)c;
|
||||
- (void)buildChain;
|
||||
|
||||
- (BOOL)open:(NSURL *)url withOutputFormat:(AudioStreamBasicDescription)outputFormat;
|
||||
- (BOOL)open:(NSURL *)url withOutputFormat:(AudioStreamBasicDescription)outputFormat withRGInfo:(NSDictionary*)rgi;
|
||||
|
||||
//Used when changing tracks to reuse the same decoder
|
||||
- (BOOL)openWithInput:(InputNode *)i withOutputFormat:(AudioStreamBasicDescription)outputFormat;
|
||||
- (BOOL)openWithInput:(InputNode *)i withOutputFormat:(AudioStreamBasicDescription)outputFormat withRGInfo:(NSDictionary*)rgi;
|
||||
|
||||
- (void)seek:(double)time;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
finalNode = converterNode;
|
||||
}
|
||||
|
||||
- (BOOL)open:(NSURL *)url withOutputFormat:(AudioStreamBasicDescription)outputFormat
|
||||
- (BOOL)open:(NSURL *)url withOutputFormat:(AudioStreamBasicDescription)outputFormat withRGInfo:(NSDictionary *)rgi
|
||||
{
|
||||
[self setStreamURL:url];
|
||||
|
||||
|
@ -61,6 +61,8 @@
|
|||
if (![converterNode setupWithInputFormat:propertiesToASBD([inputNode properties]) outputFormat:outputFormat])
|
||||
return NO;
|
||||
|
||||
[self setRGInfo:rgi];
|
||||
|
||||
// return NO;
|
||||
|
||||
return YES;
|
||||
|
|
Loading…
Reference in New Issue