Browse Source

disabled required usage of stb_ogg_sound

Nicolas Cannasse 6 years ago
parent
commit
f831bd534f
2 changed files with 14 additions and 3 deletions
  1. 0 1
      all.hxml
  2. 14 2
      hxd/snd/OggData.hx

+ 0 - 1
all.hxml

@@ -1,7 +1,6 @@
 -lib heaps
 -lib heaps
 -lib castle
 -lib castle
 -lib hxbit
 -lib hxbit
--lib stb_ogg_sound
 --macro include('h3d')
 --macro include('h3d')
 --macro include('h2d',true,['h2d.domkit'])
 --macro include('h2d',true,['h2d.domkit'])
 --macro include('hxsl',true,['hxsl.Macros','hxsl.CacheFile','hxsl.CacheFileBuilder','hxsl.Checker'])
 --macro include('hxsl',true,['hxsl.Macros','hxsl.CacheFile','hxsl.CacheFileBuilder','hxsl.Checker'])

+ 14 - 2
hxd/snd/OggData.hx

@@ -80,8 +80,7 @@ class OggData extends Data {
 
 
 }
 }
 
 
-
-#else
+#elseif stb_ogg_sound
 
 
 private class BytesOutput extends haxe.io.Output {
 private class BytesOutput extends haxe.io.Output {
 
 
@@ -184,4 +183,17 @@ class OggData extends Data {
 
 
 }
 }
 
 
+#else
+
+class OggData extends Data {
+
+	public function new( bytes : haxe.io.Bytes ) {
+	}
+
+	override function decodeBuffer(out:haxe.io.Bytes, outPos:Int, sampleStart:Int, sampleCount:Int) {
+		throw "Ogg support requires -lib stb_ogg_sound";
+	}
+
+}
+
 #end
 #end