Skip to content

Commit

Permalink
Modify SamplePlayer to build module list dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
sitomani committed Oct 3, 2022
1 parent 7d8d020 commit 58e5019
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 97 deletions.
2 changes: 1 addition & 1 deletion 4champ/Replay/Hively/HVLReplayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ - (NSInteger) volumeOnChannel:(NSInteger)channel {
- (bool) loadModule:(NSString *)path type:(NSString*) type {
currentHVLtune = hvl_LoadTune((TEXT*)[path UTF8String], 44100, hvlStereoSeparation );
if (currentHVLtune == nil) {
return nil;
return false;
}

curpos = 0;
Expand Down
45 changes: 20 additions & 25 deletions SamplePlayer/SamplePlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
45BAC923208BAA5800ACEDB8 /* 1st_intro.mod in Resources */ = {isa = PBXBuildFile; fileRef = 45BAC921208BAA5800ACEDB8 /* 1st_intro.mod */; };
45BAC925208CA64900ACEDB8 /* mislead.ahx in Resources */ = {isa = PBXBuildFile; fileRef = 45BAC924208CA64900ACEDB8 /* mislead.ahx */; };
45C005B5208B7B1800126E78 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C005B4208B7B1800126E78 /* AppDelegate.swift */; };
45C005B7208B7B1800126E78 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C005B6208B7B1800126E78 /* ViewController.swift */; };
45C005BA208B7B1800126E78 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 45C005B8208B7B1800126E78 /* Main.storyboard */; };
Expand All @@ -18,18 +16,15 @@
45D707E6208B7C52004CB16A /* HVLReplayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 45D707DA208B7C52004CB16A /* HVLReplayer.mm */; };
45D707E7208B7C52004CB16A /* MPTReplayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45D707DD208B7C52004CB16A /* MPTReplayer.m */; };
45D707E8208B7C52004CB16A /* Replay.m in Sources */ = {isa = PBXBuildFile; fileRef = 45D707DF208B7C52004CB16A /* Replay.m */; };
45D707F5208B7E2A004CB16A /* all.in.eightchannels.xm in Resources */ = {isa = PBXBuildFile; fileRef = 45D707F1208B7E2A004CB16A /* all.in.eightchannels.xm */; };
45D707F6208B7E2A004CB16A /* peanuts!.hvl in Resources */ = {isa = PBXBuildFile; fileRef = 45D707F2208B7E2A004CB16A /* peanuts!.hvl */; };
739D39B52652A095001EBC9E /* liblibopenmpt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 739D39B42652A095001EBC9E /* liblibopenmpt.a */; };
73759FCA28EB271A00535F8E /* libopenmpt.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73759FC928EB271A00535F8E /* libopenmpt.xcframework */; };
73759FD028EB2B0A00535F8E /* Modules.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 73759FCF28EB2B0A00535F8E /* Modules.bundle */; };
739D39B82652A0EC001EBC9E /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 739D39B72652A0EC001EBC9E /* libz.tbd */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
45BAC921208BAA5800ACEDB8 /* 1st_intro.mod */ = {isa = PBXFileReference; lastKnownFileType = file; path = 1st_intro.mod; sourceTree = "<group>"; };
45BAC924208CA64900ACEDB8 /* mislead.ahx */ = {isa = PBXFileReference; lastKnownFileType = file; path = mislead.ahx; sourceTree = "<group>"; };
45C005B1208B7B1800126E78 /* SamplePlayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SamplePlayer.app; sourceTree = BUILT_PRODUCTS_DIR; };
45C005B4208B7B1800126E78 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
45C005B6208B7B1800126E78 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
45C005B6208B7B1800126E78 /* ViewController.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; tabWidth = 2; };
45C005B9208B7B1800126E78 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
45C005BB208B7B1800126E78 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
45C005BE208B7B1800126E78 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
Expand All @@ -43,9 +38,8 @@
45D707DD208B7C52004CB16A /* MPTReplayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTReplayer.m; sourceTree = "<group>"; };
45D707DE208B7C52004CB16A /* Replay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Replay.h; sourceTree = "<group>"; };
45D707DF208B7C52004CB16A /* Replay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Replay.m; sourceTree = "<group>"; };
45D707F1208B7E2A004CB16A /* all.in.eightchannels.xm */ = {isa = PBXFileReference; lastKnownFileType = file; path = all.in.eightchannels.xm; sourceTree = "<group>"; };
45D707F2208B7E2A004CB16A /* peanuts!.hvl */ = {isa = PBXFileReference; lastKnownFileType = file; path = "peanuts!.hvl"; sourceTree = "<group>"; };
739D39B42652A095001EBC9E /* liblibopenmpt.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblibopenmpt.a; path = ../../openmpt/liblibopenmpt.a; sourceTree = "<group>"; };
73759FC928EB271A00535F8E /* libopenmpt.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libopenmpt.xcframework; path = ../../openmpt/libopenmpt.xcframework; sourceTree = "<group>"; };
73759FCF28EB2B0A00535F8E /* Modules.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Modules.bundle; sourceTree = "<group>"; };
739D39B72652A0EC001EBC9E /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
/* End PBXFileReference section */

Expand All @@ -54,8 +48,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
73759FCA28EB271A00535F8E /* libopenmpt.xcframework in Frameworks */,
739D39B82652A0EC001EBC9E /* libz.tbd in Frameworks */,
739D39B52652A095001EBC9E /* liblibopenmpt.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -83,6 +77,7 @@
45C005B3208B7B1800126E78 /* SamplePlayer */ = {
isa = PBXGroup;
children = (
73759FCF28EB2B0A00535F8E /* Modules.bundle */,
45D707EF208B7E2A004CB16A /* Modules */,
45C005B4208B7B1800126E78 /* AppDelegate.swift */,
45C005B6208B7B1800126E78 /* ViewController.swift */,
Expand Down Expand Up @@ -130,19 +125,15 @@
45D707EA208B7CEA004CB16A /* Frameworks */ = {
isa = PBXGroup;
children = (
73759FC928EB271A00535F8E /* libopenmpt.xcframework */,
739D39B72652A0EC001EBC9E /* libz.tbd */,
739D39B42652A095001EBC9E /* liblibopenmpt.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
45D707EF208B7E2A004CB16A /* Modules */ = {
isa = PBXGroup;
children = (
45BAC924208CA64900ACEDB8 /* mislead.ahx */,
45BAC921208BAA5800ACEDB8 /* 1st_intro.mod */,
45D707F1208B7E2A004CB16A /* all.in.eightchannels.xm */,
45D707F2208B7E2A004CB16A /* peanuts!.hvl */,
);
path = Modules;
sourceTree = "<group>";
Expand Down Expand Up @@ -206,13 +197,10 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
45D707F6208B7E2A004CB16A /* peanuts!.hvl in Resources */,
45D707F5208B7E2A004CB16A /* all.in.eightchannels.xm in Resources */,
45BAC925208CA64900ACEDB8 /* mislead.ahx in Resources */,
45C005BF208B7B1800126E78 /* LaunchScreen.storyboard in Resources */,
45C005BC208B7B1800126E78 /* Assets.xcassets in Resources */,
45C005BA208B7B1800126E78 /* Main.storyboard in Resources */,
45BAC923208BAA5800ACEDB8 /* 1st_intro.mod in Resources */,
73759FD028EB2B0A00535F8E /* Modules.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -356,7 +344,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 11.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -371,7 +360,10 @@
DEVELOPMENT_TEAM = 2G92PSCBJ9;
HEADER_SEARCH_PATHS = ../../openmpt/libopenmpt;
INFOPLIST_FILE = SamplePlayer/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = ../../openmpt;
PRODUCT_BUNDLE_IDENTIFIER = com.4champ.SamplePlayer;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -392,7 +384,10 @@
DEVELOPMENT_TEAM = 2G92PSCBJ9;
HEADER_SEARCH_PATHS = ../../openmpt/libopenmpt;
INFOPLIST_FILE = SamplePlayer/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = ../../openmpt;
PRODUCT_BUNDLE_IDENTIFIER = com.4champ.SamplePlayer;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Loading

0 comments on commit 58e5019

Please sign in to comment.