From 738c3baeb6477c47dba70854068ed4d1d496763f Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Mon, 12 Feb 2018 09:25:09 +0100 Subject: [PATCH] Do not show the channels number if the number is 0 --- MP42/MP42AudioTrack.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MP42/MP42AudioTrack.m b/MP42/MP42AudioTrack.m index 765c7de..b3c0ac5 100644 --- a/MP42/MP42AudioTrack.m +++ b/MP42/MP42AudioTrack.m @@ -244,7 +244,12 @@ 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]; + if (_channels > 0) { + return [NSString stringWithFormat:@"%@, %u ch", localizedDisplayName(self.mediaType, self.format), (unsigned int)_channels]; + } + else { + return [NSString stringWithFormat:@"%@", localizedDisplayName(self.mediaType, self.format)]; + } } }