From 4586d7f2415136a4125300910a7726fefe071a80 Mon Sep 17 00:00:00 2001 From: vspader Date: Sat, 22 Apr 2006 01:26:57 +0000 Subject: [PATCH] Sndfile fix? --- Changelog | 4 ++++ Playlist/PlaylistEntry.m | 4 ++-- Sound/SoundFile/SoundFile.mm | 7 +++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Changelog b/Changelog index 2920a3387..1708daa8e 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +0.05 alpha 5 +------------ +Hopefully fixes wavpack on intel. + 0.05 alpha 4 ------------ Volume slider now gravitates to 100%, in the middle. diff --git a/Playlist/PlaylistEntry.m b/Playlist/PlaylistEntry.m index 8eb632026..f7cde13bc 100644 --- a/Playlist/PlaylistEntry.m +++ b/Playlist/PlaylistEntry.m @@ -188,9 +188,9 @@ - (void)readInfo { - SoundFile *sp; SoundFile *sf = [SoundFile readInfo:filename]; - sp= sf; + if (sf == nil) + return; length = [sf length]; bitRate = [sf bitRate]; diff --git a/Sound/SoundFile/SoundFile.mm b/Sound/SoundFile/SoundFile.mm index 48dd36b3a..33c8e1e4e 100644 --- a/Sound/SoundFile/SoundFile.mm +++ b/Sound/SoundFile/SoundFile.mm @@ -144,13 +144,12 @@ BOOL hostIsBigEndian() soundFile = [SoundFile soundFileFromFilename:filename]; b = [soundFile readInfo:[filename UTF8String]]; + if (b == NO) + return nil; [soundFile close]; - if (b == YES) - return soundFile; - - return nil; + return soundFile; } - (void)reset