OpenFL version compatibility fix (reopen) (#250)
* OpenFL version compatibility fix Uses var alias "__source" on 9.2.2 or "__audioSource" on latest, in case of using latest libraries. * Revert "OpenFL version compatibility fix" This reverts commitaa83aee5a5. * OpenFL Compatibility fix Uses (compiles) "__source" or "__audioSource" variable depending of the OpenFL version, in order to not break FlxSound. * Revert "OpenFL Compatibility fix" This reverts commit18a9aeddf9. * OpenFL compatibility fix (get/set var) (suggestion by @NeeEoo) uses an auxiliary "__audioSource" variable for usage on latest OpenFL versions, in order to not break FlxSound class.
This commit is contained in:
@@ -64,6 +64,7 @@ import lime.media.AudioSource;
|
||||
@:noCompletion private var __soundTransform:SoundTransform;
|
||||
#if lime
|
||||
@:noCompletion private var __source:AudioSource;
|
||||
@:noCompletion private var __audioSource(get, set):AudioSource;
|
||||
#end
|
||||
|
||||
#if openfljs
|
||||
@@ -232,6 +233,14 @@ import lime.media.AudioSource;
|
||||
__dispose();
|
||||
dispatchEvent(new Event(Event.SOUND_COMPLETE));
|
||||
}
|
||||
|
||||
function set___audioSource(value:AudioSource):AudioSource {
|
||||
return __source = value;
|
||||
}
|
||||
|
||||
function get___audioSource():AudioSource {
|
||||
return __source;
|
||||
}
|
||||
}
|
||||
#else
|
||||
typedef SoundChannel = flash.media.SoundChannel;
|
||||
|
||||
Reference in New Issue
Block a user