forked from LeenkxTeam/LNXSDK
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			376 B
		
	
	
	
		
			Haxe
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			376 B
		
	
	
	
		
			Haxe
		
	
	
	
	
	
package leenkx.logicnode;
 | 
						|
 | 
						|
import aura.Aura;
 | 
						|
import aura.Types;
 | 
						|
 | 
						|
class GetAudioPositionNode extends LogicNode {
 | 
						|
 | 
						|
	public function new(tree: LogicTree) {
 | 
						|
		super(tree);
 | 
						|
	}
 | 
						|
 | 
						|
	override function get(from: Int): Dynamic {
 | 
						|
		var audio = inputs[0].get();
 | 
						|
		if (audio == null || audio.channel == null) return 0.0;
 | 
						|
		return audio.channel.floatPosition / audio.channel.sampleRate;
 | 
						|
	}
 | 
						|
}
 |