Simplify native_audio_buffers implementation
The previous version was backwards - `native_audio_buffers` would be ignored if defined, and used if not defined. Worse, with all the `!` operators, it was hard to tell. This implementation tries to fix the error in a way that is easier for a human to check.
This commit is contained in:
committed by
Joshua Granick
parent
feae6af85a
commit
a4aa3f2dd8
@@ -19,10 +19,10 @@ import lime.utils.UInt8Array;
|
|||||||
class NativeAudioSource
|
class NativeAudioSource
|
||||||
{
|
{
|
||||||
private static var STREAM_BUFFER_SIZE = 48000;
|
private static var STREAM_BUFFER_SIZE = 48000;
|
||||||
#if !(!native_audio_buffers || macro)
|
#if (native_audio_buffers && !macro)
|
||||||
private static var STREAM_NUM_BUFFERS = 3;
|
private static var STREAM_NUM_BUFFERS = Std.parseInt(haxe.macro.Compiler.getDefine("native_audio_buffers"));
|
||||||
#else
|
#else
|
||||||
private static var STREAM_NUM_BUFFERS = Std.parseInt(haxe.macro.Compiler.getDefine("native_audio_buffers"));
|
private static var STREAM_NUM_BUFFERS = 3;
|
||||||
#end
|
#end
|
||||||
private static var STREAM_TIMER_FREQUENCY = 100;
|
private static var STREAM_TIMER_FREQUENCY = 100;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user