Skip to content

Commit

Permalink
Merge pull request #1 from cyn0x8/openal_fix
Browse files Browse the repository at this point in the history
merge new fix
  • Loading branch information
Smokey555 authored Sep 25, 2024
2 parents d25ae84 + bfe6def commit e7a0d48
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ xsi:schemaLocation="http://lime.openfl.org/project/1.0.4 http://lime.openfl.org/
-->
<assets path="art/readme.txt" rename="do NOT readme.txt" library="art"/>
<assets path="CHANGELOG.md" rename="changelog.txt" library="art"/>
<assets path="alsoft.ini" />
<!-- NOTE FOR FUTURE SELF SINCE FONTS ARE ALWAYS FUCKY
TO FIX ONE OF THEM, I CONVERTED IT TO OTF. DUNNO IF YOU NEED TO
THEN UHHH I USED THE NAME OF THE FONT WITH SETFORMAT() ON THE TEXT!!!
Expand Down Expand Up @@ -248,6 +247,12 @@ xsi:schemaLocation="http://lime.openfl.org/project/1.0.4 http://lime.openfl.org/
<haxedef name="CHART_EDITOR_UNSUPPORTED" if="web" />
<haxedef name="CHART_EDITOR_SUPPORTED" unless="web"/>

<!-- 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>

<!-- Options for Polymod -->
<section if="polymod">
<!-- Turns on additional debug logging. -->
Expand Down
3 changes: 1 addition & 2 deletions alsoft.ini → alsoft.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[general]
channels=stereo
sample-type=float32
stereo-mode=speakers
stereo-encoding=panpot
Expand All @@ -12,4 +11,4 @@ volume-adjust=0
[decoder]
hq-mode=false
distance-comp=false
nfc=false
nfc=false
23 changes: 23 additions & 0 deletions source/funkin/audio/ALConfig.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package funkin.audio;

import haxe.io.Path;

class ALConfig
{
#if desktop
static function __init__():Void
{
var configPath:String = Path.directory(Path.withoutExtension(Sys.programPath()));

#if windows
configPath += "/plugins/alsoft.ini";
#elseif mac
configPath = Path.directory(configPath) + "/Resources/plugins/alsoft.conf";
#elseif linux
configPath += "/plugins/alsoft.conf";
#end

Sys.putEnv("ALSOFT_CONF", configPath);
}
#end
}

0 comments on commit e7a0d48

Please sign in to comment.