Fix the formatSummary after the conversion settings changes.
This commit is contained in:
1 parent
815119bccb
commit
523399be1b
2 files changed
+21
-3
No files matched your search
+14
-1
@@ -227,7 +227,20 @@
|
||||
|
||||
- (NSString *)formatSummary
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@, %u ch", localizedDisplayName(self.mediaType, self.format), (unsigned int)_channels];
|
||||
if (self.conversionSettings && [self.conversionSettings isKindOfClass:[MP42AudioConversionSettings class]]) {
|
||||
MP42AudioConversionSettings *settings = (MP42AudioConversionSettings *)self.conversionSettings;
|
||||
unsigned int channels = _channels;
|
||||
if ([settings.mixDown isEqualToString:SBMonoMixdown]) {
|
||||
channels = 1;
|
||||
}
|
||||
else if (![settings.mixDown isEqualToString:SBNoneMixdown]) {
|
||||
channels = 2;
|
||||
}
|
||||
return [NSString stringWithFormat:@"%@, %u ch", localizedDisplayName(self.mediaType, self.conversionSettings.format), channels];
|
||||
}
|
||||
else {
|
||||
return [NSString stringWithFormat:@"%@, %u ch", localizedDisplayName(self.mediaType, self.format), (unsigned int)_channels];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *)description {
|
||||
|
||||
Reference in new issue
Block a user