From 13166849667fd2ce9d3d417feb72f678dece9484 Mon Sep 17 00:00:00 2001 From: vspader Date: Tue, 25 Apr 2006 20:20:11 +0000 Subject: [PATCH] Fixed wavpack length --- Changelog | 4 ++-- Sound/SoundFile/WavPackFile.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 475769340..445e9a4bd 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,5 @@ -0.05 ----- +0.05 alpha 6 +----------- Updated libsndfile to 1.0.15 Wave/Aiff should now work on intel. diff --git a/Sound/SoundFile/WavPackFile.m b/Sound/SoundFile/WavPackFile.m index b1d458af0..042c858d8 100644 --- a/Sound/SoundFile/WavPackFile.m +++ b/Sound/SoundFile/WavPackFile.m @@ -30,7 +30,7 @@ int samples; samples = WavpackGetNumSamples(wpc); - totalSize = samples * channels * 4; + totalSize = samples * channels * (bitsPerSample/8); bitRate = (int)(WavpackGetAverageBitrate(wpc, TRUE)/1000.0); @@ -69,7 +69,7 @@ - (double)seekToTime:(double)milliseconds { int sample; - sample = (frequency/2)*(milliseconds/1000.0); + sample = frequency*(milliseconds/1000.0); WavpackSeekSample(wpc, sample);