Implemented BASS IT and MO3 decoder, takes priority over DUMB

CQTexperiment
Chris Moeller 2014-07-02 23:05:25 -07:00
parent c469957035
commit bda2b9e92e
7 changed files with 738 additions and 0 deletions

View File

@ -182,6 +182,7 @@
838491871808591F00E7332D /* NDHotKey.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8384917E1808585D00E7332D /* NDHotKey.framework */; };
838491881808593200E7332D /* NDHotKey.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8384917E1808585D00E7332D /* NDHotKey.framework */; };
8399D4E21805A55000B503B1 /* XmlContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8399D4E01805A55000B503B1 /* XmlContainer.m */; };
839BD010196521E600947767 /* BASSMODS.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 839BCFEC1965133F00947767 /* BASSMODS.bundle */; };
83A0F4E31816DBF900119DB4 /* playptmod.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83A0F4891816CE5E00119DB4 /* playptmod.bundle */; };
83B06704180D579E008E3612 /* MIDI.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83B066A1180D5669008E3612 /* MIDI.bundle */; };
83BCB8DE17FC971300760340 /* FFMPEG.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = B09E94350D747F7B0064F138 /* FFMPEG.bundle */; };
@ -499,6 +500,20 @@
remoteGlobalIDString = 32F1615514E6BB3B00D6AB2F;
remoteInfo = NDHotKey;
};
839BCFEB1965133F00947767 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 839BCFE71965133E00947767 /* BASSMODS.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 839BCFD21965133E00947767;
remoteInfo = BASSMODS;
};
839BD011196521FD00947767 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 839BCFE71965133E00947767 /* BASSMODS.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 839BCFD11965133E00947767;
remoteInfo = BASSMODS;
};
83A0F4881816CE5E00119DB4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83A0F4841816CE5E00119DB4 /* playptmod.xcodeproj */;
@ -636,6 +651,7 @@
dstPath = "";
dstSubfolderSpec = 13;
files = (
839BD010196521E600947767 /* BASSMODS.bundle in CopyFiles */,
835CBC8118DA7A520087A03E /* modplay.bundle in CopyFiles */,
836F706218BDD1230095E648 /* vgmstream.bundle in CopyFiles */,
836FB5A718206F2500B3AD2D /* Hively.bundle in CopyFiles */,
@ -930,6 +946,7 @@
838491791808585C00E7332D /* NDHotKey.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = NDHotKey.xcodeproj; path = Frameworks/NDHotKey/NDHotKey.xcodeproj; sourceTree = "<group>"; };
8399D4E01805A55000B503B1 /* XmlContainer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XmlContainer.m; sourceTree = "<group>"; };
8399D4E11805A55000B503B1 /* XmlContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XmlContainer.h; sourceTree = "<group>"; };
839BCFE71965133E00947767 /* BASSMODS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = BASSMODS.xcodeproj; path = Plugins/BASSMODS/BASSMODS.xcodeproj; sourceTree = "<group>"; };
83A0F4841816CE5E00119DB4 /* playptmod.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = playptmod.xcodeproj; path = Plugins/playptmod/playptmod.xcodeproj; sourceTree = "<group>"; };
83B0669C180D5668008E3612 /* MIDI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MIDI.xcodeproj; path = Plugins/MIDI/MIDI.xcodeproj; sourceTree = "<group>"; };
83E5E54A18087CA5001F3284 /* miniModeOffTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = miniModeOffTemplate.pdf; path = Images/miniModeOffTemplate.pdf; sourceTree = "<group>"; };
@ -1243,6 +1260,7 @@
83A0F4841816CE5E00119DB4 /* playptmod.xcodeproj */,
836FB5421820538700B3AD2D /* Hively.xcodeproj */,
836F6B2518BDB80D0095E648 /* vgmstream.xcodeproj */,
839BCFE71965133E00947767 /* BASSMODS.xcodeproj */,
);
name = PlugIns;
sourceTree = "<group>";
@ -1632,6 +1650,14 @@
name = Products;
sourceTree = "<group>";
};
839BCFE81965133E00947767 /* Products */ = {
isa = PBXGroup;
children = (
839BCFEC1965133F00947767 /* BASSMODS.bundle */,
);
name = Products;
sourceTree = "<group>";
};
83A0F4851816CE5E00119DB4 /* Products */ = {
isa = PBXGroup;
children = (
@ -1792,6 +1818,7 @@
buildRules = (
);
dependencies = (
839BD012196521FD00947767 /* PBXTargetDependency */,
836FB5A618206F1500B3AD2D /* PBXTargetDependency */,
83A0F4E21816DBE800119DB4 /* PBXTargetDependency */,
83E6B7641816138800D4576D /* PBXTargetDependency */,
@ -1858,6 +1885,10 @@
ProductGroup = 8359FF2D17FEF35C0060F3ED /* Products */;
ProjectRef = 8359FF2C17FEF35C0060F3ED /* ArchiveSource.xcodeproj */;
},
{
ProductGroup = 839BCFE81965133E00947767 /* Products */;
ProjectRef = 839BCFE71965133E00947767 /* BASSMODS.xcodeproj */;
},
{
ProductGroup = 17F5612B0C3BD4DC0019975C /* Products */;
ProjectRef = 17F5612A0C3BD4DC0019975C /* CogAudio.xcodeproj */;
@ -2125,6 +2156,13 @@
remoteRef = 8384917D1808585D00E7332D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
839BCFEC1965133F00947767 /* BASSMODS.bundle */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = BASSMODS.bundle;
remoteRef = 839BCFEB1965133F00947767 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83A0F4891816CE5E00119DB4 /* playptmod.bundle */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
@ -2492,6 +2530,11 @@
name = NDHotKey;
targetProxy = 838491851808591400E7332D /* PBXContainerItemProxy */;
};
839BD012196521FD00947767 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = BASSMODS;
targetProxy = 839BD011196521FD00947767 /* PBXContainerItemProxy */;
};
83A0F4E21816DBE800119DB4 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = playptmod;

View File

@ -0,0 +1,361 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
839BCFE01965133E00947767 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 839BCFDE1965133E00947767 /* InfoPlist.strings */; };
839BCFFE196513D800947767 /* umx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 839BCFF9196513D800947767 /* umx.mm */; };
839BCFFF196513D800947767 /* unrealfmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 839BCFFA196513D800947767 /* unrealfmt.cpp */; };
839BD000196513D800947767 /* unrealfmtdata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 839BCFFB196513D800947767 /* unrealfmtdata.cpp */; };
839BD004196513FF00947767 /* BASSDecoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 839BD003196513FF00947767 /* BASSDecoder.mm */; };
839BD0091965147000947767 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 839BD0081965147000947767 /* libz.dylib */; };
839BD00D196514B800947767 /* libbass.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 839BD00C196514B800947767 /* libbass.dylib */; };
839BD00E196514C000947767 /* libbass.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 839BD00C196514B800947767 /* libbass.dylib */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
839BD00A1965148500947767 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 6;
files = (
839BD00E196514C000947767 /* libbass.dylib in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
839BCFD21965133E00947767 /* BASSMODS.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BASSMODS.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
839BCFDD1965133E00947767 /* BASSMODS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BASSMODS-Info.plist"; sourceTree = "<group>"; };
839BCFDF1965133E00947767 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
839BCFE11965133E00947767 /* BASSMODS-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BASSMODS-Prefix.pch"; sourceTree = "<group>"; };
839BCFF7196513D800947767 /* umr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = umr.h; sourceTree = "<group>"; };
839BCFF8196513D800947767 /* umx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = umx.h; sourceTree = "<group>"; };
839BCFF9196513D800947767 /* umx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = umx.mm; sourceTree = "<group>"; };
839BCFFA196513D800947767 /* unrealfmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unrealfmt.cpp; sourceTree = "<group>"; };
839BCFFB196513D800947767 /* unrealfmtdata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unrealfmtdata.cpp; sourceTree = "<group>"; };
839BCFFC196513D800947767 /* urf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = urf.h; sourceTree = "<group>"; };
839BD002196513FF00947767 /* BASSDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BASSDecoder.h; sourceTree = "<group>"; };
839BD003196513FF00947767 /* BASSDecoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BASSDecoder.mm; sourceTree = "<group>"; };
839BD0081965147000947767 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
839BD00C196514B800947767 /* libbass.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libbass.dylib; path = ../../ThirdParty/BASS/libbass.dylib; sourceTree = "<group>"; };
839BD00F196514E600947767 /* bass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bass.h; path = ../../../ThirdParty/BASS/bass.h; sourceTree = "<group>"; };
839BD0131965222D00947767 /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = ../../../Audio/Plugin.h; sourceTree = "<group>"; };
839BD0141965231800947767 /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../../Utils/Logging.h; sourceTree = "<group>"; };
839BD0151965233700947767 /* PlaylistController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistController.h; path = ../../../Playlist/PlaylistController.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
839BCFCF1965133E00947767 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
839BD00D196514B800947767 /* libbass.dylib in Frameworks */,
839BD0091965147000947767 /* libz.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
839BCFC91965133E00947767 = {
isa = PBXGroup;
children = (
839BCFDB1965133E00947767 /* BASSMODS */,
839BCFD41965133E00947767 /* Frameworks */,
839BCFD31965133E00947767 /* Products */,
);
sourceTree = "<group>";
};
839BCFD31965133E00947767 /* Products */ = {
isa = PBXGroup;
children = (
839BCFD21965133E00947767 /* BASSMODS.bundle */,
);
name = Products;
sourceTree = "<group>";
};
839BCFD41965133E00947767 /* Frameworks */ = {
isa = PBXGroup;
children = (
839BD00C196514B800947767 /* libbass.dylib */,
839BD0081965147000947767 /* libz.dylib */,
839BCFD71965133E00947767 /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
839BCFD71965133E00947767 /* Other Frameworks */ = {
isa = PBXGroup;
children = (
);
name = "Other Frameworks";
sourceTree = "<group>";
};
839BCFDB1965133E00947767 /* BASSMODS */ = {
isa = PBXGroup;
children = (
839BD0151965233700947767 /* PlaylistController.h */,
839BD0141965231800947767 /* Logging.h */,
839BD0131965222D00947767 /* Plugin.h */,
839BD00F196514E600947767 /* bass.h */,
839BD002196513FF00947767 /* BASSDecoder.h */,
839BD003196513FF00947767 /* BASSDecoder.mm */,
839BD001196513DB00947767 /* archive */,
839BCFDC1965133E00947767 /* Supporting Files */,
);
path = BASSMODS;
sourceTree = "<group>";
};
839BCFDC1965133E00947767 /* Supporting Files */ = {
isa = PBXGroup;
children = (
839BCFDD1965133E00947767 /* BASSMODS-Info.plist */,
839BCFDE1965133E00947767 /* InfoPlist.strings */,
839BCFE11965133E00947767 /* BASSMODS-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
839BCFF6196513D800947767 /* umx */ = {
isa = PBXGroup;
children = (
839BCFF7196513D800947767 /* umr.h */,
839BCFF8196513D800947767 /* umx.h */,
839BCFF9196513D800947767 /* umx.mm */,
839BCFFA196513D800947767 /* unrealfmt.cpp */,
839BCFFB196513D800947767 /* unrealfmtdata.cpp */,
839BCFFC196513D800947767 /* urf.h */,
);
name = umx;
path = ../../Dumb/archive/umx;
sourceTree = "<group>";
};
839BD001196513DB00947767 /* archive */ = {
isa = PBXGroup;
children = (
839BCFF6196513D800947767 /* umx */,
);
name = archive;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
839BCFD11965133E00947767 /* BASSMODS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 839BCFE41965133E00947767 /* Build configuration list for PBXNativeTarget "BASSMODS" */;
buildPhases = (
839BCFCE1965133E00947767 /* Sources */,
839BCFCF1965133E00947767 /* Frameworks */,
839BCFD01965133E00947767 /* Resources */,
839BD00A1965148500947767 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = BASSMODS;
productName = BASSMODS;
productReference = 839BCFD21965133E00947767 /* BASSMODS.bundle */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
839BCFCA1965133E00947767 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0510;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 839BCFCD1965133E00947767 /* Build configuration list for PBXProject "BASSMODS" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 839BCFC91965133E00947767;
productRefGroup = 839BCFD31965133E00947767 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
839BCFD11965133E00947767 /* BASSMODS */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
839BCFD01965133E00947767 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
839BCFE01965133E00947767 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
839BCFCE1965133E00947767 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
839BCFFE196513D800947767 /* umx.mm in Sources */,
839BD000196513D800947767 /* unrealfmtdata.cpp in Sources */,
839BCFFF196513D800947767 /* unrealfmt.cpp in Sources */,
839BD004196513FF00947767 /* BASSDecoder.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
839BCFDE1965133E00947767 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
839BCFDF1965133E00947767 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
839BCFE21965133E00947767 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
839BCFE31965133E00947767 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
};
name = Release;
};
839BCFE51965133E00947767 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = NO;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "BASSMODS/BASSMODS-Prefix.pch";
INFOPLIST_FILE = "BASSMODS/BASSMODS-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
/Users/Chris/Source/Repos/cog/ThirdParty/BASS,
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
839BCFE61965133E00947767 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = NO;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "BASSMODS/BASSMODS-Prefix.pch";
INFOPLIST_FILE = "BASSMODS/BASSMODS-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
/Users/Chris/Source/Repos/cog/ThirdParty/BASS,
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
839BCFCD1965133E00947767 /* Build configuration list for PBXProject "BASSMODS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
839BCFE21965133E00947767 /* Debug */,
839BCFE31965133E00947767 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
839BCFE41965133E00947767 /* Build configuration list for PBXNativeTarget "BASSMODS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
839BCFE51965133E00947767 /* Debug */,
839BCFE61965133E00947767 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 839BCFCA1965133E00947767 /* Project object */;
}

View File

@ -0,0 +1,30 @@
//
// BASSDecoder.h
// Cog
//
// Created by Christopher Snowhill on 7/03/14.
// Copyright 2014 __NoWork, Inc__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "bass.h"
#import "Plugin.h"
@interface BASSDecoder : NSObject <CogDecoder> {
HMUSIC music;
id<CogSource> source;
long length;
long loops;
long fadeTotal;
long fadeRemain;
}
- (void)setSource:(id<CogSource>)s;
- (id<CogSource>)source;
- (void)cleanUp;
- (void)sync;
@end

View File

@ -0,0 +1,263 @@
//
// BASSDecoder.m
// Cog
//
// Created by Christopher Snowhill on 7/03/14.
// Copyright 2014 __NoWork, Inc__. All rights reserved.
//
#include <mutex>
#import "BASSDecoder.h"
#import "umx.h"
#import "Logging.h"
#import "PlaylistController.h"
static class Bass_Initializer
{
std::mutex lock;
bool initialized;
public:
Bass_Initializer() : initialized(false)
{
}
~Bass_Initializer()
{
if ( initialized )
{
BASS_Free();
}
}
bool check_initialized()
{
std::lock_guard<std::mutex> lock( this->lock );
return initialized;
}
bool initialize()
{
std::lock_guard<std::mutex> lock( this->lock );
if ( !initialized )
{
BASS_SetConfig( BASS_CONFIG_UPDATEPERIOD, 0 );
initialized = !!BASS_Init( 0, 44100, 0, NULL, NULL );
}
return initialized;
}
} g_initializer;
static void SyncProc( HSYNC handle, DWORD channel, DWORD data, void *user )
{
BASSDecoder * decoder = (__bridge BASSDecoder *) user;
[decoder sync];
}
@implementation BASSDecoder
+ (void)initialize
{
if (self == [BASSDecoder class])
{
g_initializer.initialize();
}
}
- (void)sync
{
++loops;
}
- (BOOL)open:(id<CogSource>)s
{
[self setSource:s];
[source seek:0 whence:SEEK_END];
long size = [source tell];
[source seek:0 whence:SEEK_SET];
void * data = malloc(size);
[source read:data amount:size];
void * try_data = unpackUmx( data, &size );
if ( try_data ) {
free( data );
data = try_data;
}
NSURL * url = [s url];
int track_num;
if ([[url fragment] length] == 0)
track_num = 0;
else
track_num = [[url fragment] intValue];
int resampling_int = -1;
NSString * resampling = [[NSUserDefaults standardUserDefaults] stringForKey:@"resampling"];
if ([resampling isEqualToString:@"zoh"])
resampling_int = 0;
else if ([resampling isEqualToString:@"blep"])
resampling_int = 0;
else if ([resampling isEqualToString:@"linear"])
resampling_int = 1;
else if ([resampling isEqualToString:@"cubic"])
resampling_int = 1;
else if ([resampling isEqualToString:@"sinc"])
resampling_int = 2;
music = BASS_MusicLoad( 1, data, 0, size, BASS_SAMPLE_FLOAT | BASS_SAMPLE_LOOP | BASS_MUSIC_RAMP | BASS_MUSIC_PRESCAN | BASS_MUSIC_DECODE | (resampling_int == 0 ? BASS_MUSIC_NONINTER : ((resampling_int == 2) ? BASS_MUSIC_SINCINTER : 0)), 44100 );
if ( !music )
{
ALog(@"BASS MusicLoad error: %u", BASS_ErrorGetCode());
free(data);
return NO;
}
BASS_ChannelSetPosition( music, MAKELONG(track_num, 0), BASS_POS_MUSIC_ORDER );
length = BASS_ChannelGetLength( music, BASS_POS_BYTE ) / (sizeof(float) * 2);
BASS_ChannelSetSync( music, BASS_SYNC_END, 0, SyncProc, (__bridge void*) self );
loops = 0;
fadeTotal = fadeRemain = 44100 * 8;
[self willChangeValueForKey:@"properties"];
[self didChangeValueForKey:@"properties"];
return YES;
}
- (NSDictionary *)properties
{
return [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:0], @"bitrate",
[NSNumber numberWithFloat:44100], @"sampleRate",
[NSNumber numberWithDouble:length], @"totalFrames",
[NSNumber numberWithInt:32], @"bitsPerSample", //Samples are short
[NSNumber numberWithBool:YES], @"floatingPoint",
[NSNumber numberWithInt:2], @"channels", //output from gme_play is in stereo
[NSNumber numberWithBool:[source seekable]], @"seekable",
@"host", @"endian",
nil];
}
- (int)readAudio:(void *)buf frames:(UInt32)frames
{
int total = 0;
while ( total < frames ) {
float * fbuf = (float*)buf + total * 2;
int framesToRender = 1024;
if ( framesToRender > frames )
framesToRender = frames;
int rendered = BASS_ChannelGetData( music, fbuf, (framesToRender * 2 * sizeof(float)) | BASS_DATA_FLOAT );
if (rendered < 0) {
ALog(@"BASS ChannelGetData error: %u", BASS_ErrorGetCode());
return 0;
}
rendered /= sizeof(float) * 2;
if (rendered <= 0)
break;
if ( !IsRepeatOneSet() && loops >= 2 ) {
float * sampleBuf = ( float * ) buf + total * 2;
long fadeEnd = fadeRemain - rendered;
if ( fadeEnd < 0 )
fadeEnd = 0;
float fadePosf = (float)fadeRemain / fadeTotal;
const float fadeStep = 1.0 / fadeTotal;
for ( long fadePos = fadeRemain; fadePos > fadeEnd; --fadePos, fadePosf -= fadeStep ) {
long offset = (fadeRemain - fadePos) * 2;
float sampleLeft = sampleBuf[ offset + 0 ];
float sampleRight = sampleBuf[ offset + 1 ];
sampleLeft *= fadePosf;
sampleRight *= fadePosf;
sampleBuf[ offset + 0 ] = sampleLeft;
sampleBuf[ offset + 1 ] = sampleRight;
}
rendered = fadeRemain - fadeEnd;
fadeRemain = fadeEnd;
}
total += rendered;
if ( rendered < framesToRender )
break;
}
return total;
}
- (long)seek:(long)frame
{
long pos = BASS_ChannelGetPosition(music, BASS_POS_BYTE) / (sizeof(float) * 2);
if (frame < pos) {
//Reset. Dumb cannot seek backwards. It's dumb.
[self cleanUp];
[source seek:0 whence:SEEK_SET];
[self open:source];
pos = 0;
}
BASS_ChannelSetPosition( music, (frame - pos) * (sizeof(float) * 2), BASS_POS_BYTE | BASS_POS_DECODETO );
return frame;
}
- (void)cleanUp
{
if (music) {
BASS_MusicFree( music );
music = 0;
}
}
- (void)close
{
[self cleanUp];
if (source) {
[source close];
[self setSource:nil];
}
}
- (void)setSource:(id<CogSource>)s
{
[s retain];
[source release];
source = s;
}
- (id<CogSource>)source
{
return source;
}
+ (NSArray *)fileTypes
{
return [NSArray arrayWithObjects:@"it", @"itz", @"umx", @"mo3", nil];
}
+ (NSArray *)mimeTypes
{
return [NSArray arrayWithObjects:@"audio/x-it", nil];
}
+ (float)priority
{
return 1.5;
}
@end

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>NoWork-Inc.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 Christopher Snowhill. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

View File

@ -0,0 +1,9 @@
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif

View File

@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */