Skip to content

Commit

Permalink
allow any file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Dec 11, 2024
1 parent 21addbe commit 542408e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions flixel/system/frontEnds/AssetFrontEnd.hx
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,10 @@ class AssetFrontEnd
public function new () {}
#end

#if (FLX_SOUND_ADD_EXT == "wav")
public static final defaultSoundExtension:String = '.wav';
#elseif (FLX_SOUND_ADD_EXT == "mp3")
public static final defaultSoundExtension:String = '.mp3';
#elseif (FLX_SOUND_ADD_EXT == "ogg")
public static final defaultSoundExtension:String = '.ogg';
#if (FLX_SOUND_ADD_EXT == "1" || FLX_SOUND_NO_ADD_EXT)
public final defaultSoundExtension:String = #if flash ".mp3" #else ".ogg" #end;
#else
public static final defaultSoundExtension:String = #if flash ".mp3" #else ".ogg" #end;
public final defaultSoundExtension:String = '.${haxe.macro.Compiler.getDefine("FLX_SOUND_ADD_EXT")}';
#end

/**
Expand Down
2 changes: 1 addition & 1 deletion flixel/system/macros/FlxDefines.hx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private enum UserDefines
/**
* Allows you to use sound paths with no extension, and the default sound type for that
* target will be used. If enabled it will use ogg on all targets except flash, which uses mp3.
* If this flag is set to "wav", "mp3" or "ogg" if will use that type
* If this flag is set to any string, that is used for the file extension
*/
FLX_SOUND_ADD_EXT;
}
Expand Down

0 comments on commit 542408e

Please sign in to comment.