CUE: Round up bits per sample
Round bits per sample to an even byte. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
c9a5bf26f9
commit
2ac9741ef2
1 changed files with 2 additions and 2 deletions
|
@ -165,7 +165,7 @@ static void *kCueSheetDecoderContext = &kCueSheetDecoderContext;
|
||||||
int channels = [[properties objectForKey:@"channels"] intValue];
|
int channels = [[properties objectForKey:@"channels"] intValue];
|
||||||
float sampleRate = [[properties objectForKey:@"sampleRate"] floatValue];
|
float sampleRate = [[properties objectForKey:@"sampleRate"] floatValue];
|
||||||
|
|
||||||
bytesPerFrame = (bitsPerSample / 8) * channels;
|
bytesPerFrame = ((bitsPerSample + 7) / 8) * channels;
|
||||||
|
|
||||||
double _trackStart = [track time];
|
double _trackStart = [track time];
|
||||||
if(![track timeInSamples]) _trackStart *= sampleRate;
|
if(![track timeInSamples]) _trackStart *= sampleRate;
|
||||||
|
@ -195,7 +195,7 @@ static void *kCueSheetDecoderContext = &kCueSheetDecoderContext;
|
||||||
int bitsPerSample = [[properties objectForKey:@"bitsPerSample"] intValue];
|
int bitsPerSample = [[properties objectForKey:@"bitsPerSample"] intValue];
|
||||||
int channels = [[properties objectForKey:@"channels"] intValue];
|
int channels = [[properties objectForKey:@"channels"] intValue];
|
||||||
|
|
||||||
bytesPerFrame = (bitsPerSample / 8) * channels;
|
bytesPerFrame = ((bitsPerSample + 7) / 8) * channels;
|
||||||
|
|
||||||
trackStart = 0;
|
trackStart = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue