Fix incorrectly loading OGG

This commit is contained in:
Pyral 2024-12-06 18:25:06 -05:00
parent 23359f2fef
commit 5069dd65c7

View File

@ -29,9 +29,7 @@ static func load_mp3(buffer:PackedByteArray)->AudioStreamMP3:
return sfx return sfx
static func load_ogg(buffer:PackedByteArray)->AudioStreamOggVorbis: static func load_ogg(buffer:PackedByteArray)->AudioStreamOggVorbis:
var sfx := AudioStreamOggVorbis.new() return AudioStreamOggVorbis.load_from_buffer(buffer)
sfx.load_from_buffer(buffer)
return sfx
static func load_txt(buffer:PackedByteArray)->String: static func load_txt(buffer:PackedByteArray)->String:
var txt:String = buffer.get_string_from_utf8() var txt:String = buffer.get_string_from_utf8()