console: add notImplemented to audio property stubs
This commit is contained in:
@@ -73,8 +73,7 @@ class AudioBuffer {
|
||||
|
||||
#if lime_console
|
||||
|
||||
// TODO(james4k): AudioBuffer.fromBytes
|
||||
openfl.Lib.notImplemented ("Sound.fromBytes");
|
||||
lime.Lib.notImplemented ("AudioBuffer.fromBytes");
|
||||
|
||||
#elseif ((cpp || neko || nodejs) && !macro)
|
||||
|
||||
|
||||
@@ -403,6 +403,11 @@ class AudioSource {
|
||||
|
||||
return Std.int (channel.position);
|
||||
|
||||
#elseif lime_console
|
||||
|
||||
lime.Lib.notImplemented ("AudioSource.get_currentTime");
|
||||
return 0;
|
||||
|
||||
#else
|
||||
|
||||
var time = Std.int (AL.getSourcef (id, AL.SEC_OFFSET) * 1000) - offset;
|
||||
@@ -426,6 +431,11 @@ class AudioSource {
|
||||
//channel.position = value;
|
||||
return pauseTime = value;
|
||||
|
||||
#elseif lime_console
|
||||
|
||||
lime.Lib.notImplemented ("AudioSource.set_currentTime");
|
||||
return value;
|
||||
|
||||
#else
|
||||
|
||||
if (buffer != null) {
|
||||
@@ -472,6 +482,11 @@ class AudioSource {
|
||||
|
||||
return channel.soundTransform.volume;
|
||||
|
||||
#elseif lime_console
|
||||
|
||||
lime.Lib.notImplemented ("AudioSource.get_gain");
|
||||
return 1;
|
||||
|
||||
#else
|
||||
|
||||
return AL.getSourcef (id, AL.GAIN);
|
||||
@@ -494,6 +509,11 @@ class AudioSource {
|
||||
channel.soundTransform = soundTransform;
|
||||
return value;
|
||||
|
||||
#elseif lime_console
|
||||
|
||||
lime.Lib.notImplemented ("AudioSource.set_gain");
|
||||
return value;
|
||||
|
||||
#else
|
||||
|
||||
AL.sourcef (id, AL.GAIN, value);
|
||||
@@ -520,6 +540,11 @@ class AudioSource {
|
||||
|
||||
return Std.int (buffer.src.length);
|
||||
|
||||
#elseif lime_console
|
||||
|
||||
lime.Lib.notImplemented ("AudioSource.get_length");
|
||||
return 0;
|
||||
|
||||
#else
|
||||
|
||||
var samples = (buffer.data.length * 8) / (buffer.channels * buffer.bitsPerSample);
|
||||
@@ -532,7 +557,12 @@ class AudioSource {
|
||||
|
||||
private function set_length (value:Int):Int {
|
||||
|
||||
#if (!flash && !html5)
|
||||
#if lime_console
|
||||
|
||||
lime.Lib.notImplemented ("AudioSource.set_length");
|
||||
return value;
|
||||
|
||||
#elseif (!flash && !html5)
|
||||
|
||||
if (playing && __length != value) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user