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