浏览代码

more details on fail to queue buffers

Nicolas Cannasse 6 年之前
父节点
当前提交
b0e916e141
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      hxd/snd/openal/Driver.hx

+ 3 - 2
hxd/snd/openal/Driver.hx

@@ -147,8 +147,9 @@ class Driver implements hxd.snd.Driver {
 		bytes.setInt32(0, buffer.inst.toInt());
 		AL.sourceQueueBuffers(source.inst, 1, bytes);
 
-		if (AL.getError() != AL.NO_ERROR)
-			throw "Failed to queue buffers: " + StringTools.hex(AL.getError());
+		var err = AL.getError();
+		if (err != AL.NO_ERROR)
+			throw "Failed to queue buffers: " + StringTools.hex(err)+" ("+buffer.inst.toInt()+")";
 
 		if (AL.getSourcei(source.inst, AL.SOURCE_STATE) == AL.STOPPED) {
 			if (sampleStart > 0) {