diff --git a/Cog.xcodeproj/project.pbxproj b/Cog.xcodeproj/project.pbxproj index bbaf703e1..a3809e973 100644 --- a/Cog.xcodeproj/project.pbxproj +++ b/Cog.xcodeproj/project.pbxproj @@ -97,6 +97,7 @@ 8E757B5709F326710080F1EE /* OggFLAC.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8E75773809F31F1F0080F1EE /* OggFLAC.framework */; }; 8E757C7C09F32F070080F1EE /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E757C7A09F32F070080F1EE /* AudioToolbox.framework */; }; 8E757C7D09F32F070080F1EE /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E757C7B09F32F070080F1EE /* AudioUnit.framework */; }; + 8EEBC1B50A177D70006F6251 /* PlaylistEntry.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 8EEBC1B40A177D70006F6251 /* PlaylistEntry.xcdatamodel */; }; /* End PBXBuildFile section */ /* Begin PBXBuildStyle section */ @@ -270,6 +271,7 @@ 8E75777809F320D50080F1EE /* SndFile.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SndFile.framework; path = Libraries/SndFile/build/Release/SndFile.framework; sourceTree = ""; }; 8E757C7A09F32F070080F1EE /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; 8E757C7B09F32F070080F1EE /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; + 8EEBC1B40A177D70006F6251 /* PlaylistEntry.xcdatamodel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.xcdatamodel; path = PlaylistEntry.xcdatamodel; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -339,6 +341,7 @@ 29B97314FDCFA39411CA2CEA /* Cog */ = { isa = PBXGroup; children = ( + 8EEBC1AF0A177D14006F6251 /* Models */, 080E96DDFE201D6D7F000001 /* Classes */, 8E75751809F31D5A0080F1EE /* AppController.h */, 8E75751909F31D5A0080F1EE /* AppController.m */, @@ -562,6 +565,14 @@ name = "Codec Frameworks"; sourceTree = ""; }; + 8EEBC1AF0A177D14006F6251 /* Models */ = { + isa = PBXGroup; + children = ( + 8EEBC1B40A177D70006F6251 /* PlaylistEntry.xcdatamodel */, + ); + name = Models; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -691,6 +702,7 @@ 8E4C7F090A0509FC003BE25F /* DragScrollView.m in Sources */, 8E6A8E2C0A0D8A68002ABE9C /* CoreAudioFile.m in Sources */, 8E6A8E380A0D8AD8002ABE9C /* CoreAudioUtils.m in Sources */, + 8EEBC1B50A177D70006F6251 /* PlaylistEntry.xcdatamodel in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Sound/SoundFile/CoreAudioFile.m b/Sound/SoundFile/CoreAudioFile.m index dd9f19a92..4389cd4fa 100644 --- a/Sound/SoundFile/CoreAudioFile.m +++ b/Sound/SoundFile/CoreAudioFile.m @@ -187,8 +187,8 @@ OSStatus writeFunc(void * inRefCon, SInt64 inPosition, ByteCount requestCount, c [self close]; return NO; } - - bitRate = ((totalBytes*8)/((totalFrames)/asbd.mSampleRate))/1000.0; + NSLog(@"BITRATE: %lli %lli %lf", totalBytes, totalFrames, asbd.mSampleRate); + bitRate = round(((totalBytes*8.0)/((double)(totalFrames)/asbd.mSampleRate))/1000.0); #else //Is there a way to get bitrate with extAudioFile? bitRate = 0;