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