Skip to content

Commit

Permalink
Upload these along with that
Browse files Browse the repository at this point in the history
  • Loading branch information
glowsoony committed Jan 22, 2025
1 parent d28070f commit daa7069
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ xsi:schemaLocation="http://lime.openfl.org/project/1.0.4 http://lime.openfl.org/

<assets path='list.txt' rename='modsList.txt' if="mac"/>

<!-- OpenAL config -->
<section if="desktop">
<assets path="alsoft.txt" rename="plugins/alsoft.ini" type="text" if="windows"/>
<assets path="alsoft.txt" rename="plugins/alsoft.conf" type="text" unless="windows"/>
</section>

<!-- assets path="CHANGELOG.md" rename='changelog.txt' -->

<!-- NOTE FOR FUTURE SELF SINCE FONTS ARE ALWAYS FUCKY
Expand Down Expand Up @@ -264,12 +270,15 @@ xsi:schemaLocation="http://lime.openfl.org/project/1.0.4 http://lime.openfl.org/
<haxelib name="FlxPartialSound"/>
<haxelib name="flxsoundfilters" />

<haxedef name="FM_ENGINE" value="SCE"/>
<haxedef name="FM_ENGINE_VERSION" value="1.5.3"/>
<!--<define name="FunkinModcharting" /> --> <!--Not used because SCE adapter is not public-->
<section if="FunkinModcharting">
<haxedef name="FM_ENGINE" value="SCE"/>
<haxedef name="FM_ENGINE_VERSION" value="1.5.3"/>

<haxelib name="funkin-modchart" />
<haxelib name="funkin-modchart" />

<define name="FunkinModchart" if="funkin-modchart"/>
<define name="FunkinModchart" if="funkin-modchart"/>
</section>

<!--Disable source traces for release builds-->
<haxeflag name="-D no-traces"/>
Expand Down
14 changes: 14 additions & 0 deletions alsoft.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[general]
sample-type=float32
stereo-mode=speakers
stereo-encoding=panpot
hrtf=false
cf_level=0
resampler=fast_bsinc24
front-stablizer=false
output-limiter=false
volume-adjust=0
[decoder]
hq-mode=false
distance-comp=false
nfc=false
3 changes: 3 additions & 0 deletions funkinscsource/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ import debug.FPSCounter;
import gamejolt.GameJoltGroup.GJToastManager;
import gamejolt.*;
import states.TitleState;
#if desktop // Just to make sure DCE doesn't remove this, since it's not directly referenced anywhere else.
import backend.ALSoftConfig;
#end

// NATIVE API STUFF, YOU CAN IGNORE THIS AND SCROLL //
#if (linux && !debug)
Expand Down
28 changes: 28 additions & 0 deletions funkinscsource/audio/ALSoftConfig.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package audio;

import haxe.io.Path;

/*
A class that simply points OpenALSoft to a custom configuration file when the game starts up.
The config overrides a few global OpenALSoft settings with the aim of improving audio quality on desktop targets.
*/
@:keep class ALSoftConfig
{
#if desktop
static function __init__():Void
{
var origin:String = #if hl Sys.getCwd() #else Sys.programPath() #end;

var configPath:String = Path.directory(Path.withoutExtension(origin));
#if windows
configPath += "/plugins/alsoft.ini";
#elseif mac
configPath = Path.directory(configPath) + "/Resources/plugins/alsoft.conf";
#else
configPath += "/plugins/alsoft.conf";
#end

Sys.putEnv("ALSOFT_CONF", configPath);
}
#end
}
Empty file added list.txt
Empty file.
1 change: 1 addition & 0 deletions setup/unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# https://haxe.org/download/version/4.3.6/
haxelib install lime
haxelib install openfl
haxelib install funkin-modchart
haxelib git flixel https://github.com/glowsoony/flixel/tree/main
haxelib git flixel-addons https://github.com/glowsoony/flixel-addons/tree/dev
haxelib install tjson
Expand Down
1 change: 1 addition & 0 deletions setup/windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ haxelib install hxgamejolt-api
haxelib install markdown
haxelib install format
haxelib install openfl
haxelib install funkin-modchart
haxelib git flixel https://github.com/glowsoony/flixel/tree/main
haxelib git flixel-addons https://github.com/glowsoony/flixel-addons/tree/dev
haxelib git hscript-improved https://github.com/glowsoony/hscript-improved/tree/custom-classes
Expand Down

0 comments on commit daa7069

Please sign in to comment.