track.drc = [trackDict[@"DRC"] doubleValue];
track.gain = [trackDict[@"Gain"] doubleValue];
track.mixdown = hb_mixdown_get_from_name([trackDict[@"Mixdown"] UTF8String]);
- if ([trackDict[@"Samplerate"] isKindOfClass:[NSString class]])
- {
- int sampleRate = hb_audio_samplerate_get_from_name([trackDict[@"Samplerate"] UTF8String]);
- track.sampleRate = sampleRate == -1 ? 0 : sampleRate;
- }
- else
- {
- track.sampleRate = [trackDict[@"Samplerate"] intValue];
- }
+ track.sampleRate = [trackDict[@"Samplerate"] intValue] == -1 ? 0 : [trackDict[@"Samplerate"] intValue];
track.bitRate = [trackDict[@"Bitrate"] intValue];
track.encoder = hb_audio_encoder_get_from_name([trackDict[@"Encoder"] UTF8String]);