<commit_before>package hxd.snd;

@:allow(hxd.snd.Manager)
class ChannelBase {

	public var priority       : Float = 0.;
	public var mute           : Bool = false;
	public var effects        : Array<Effect> = [];
	public var bindedEffects  : Array<Effect> = [];

	public var volume(default, set) : Float = 1.;
	var currentFade : { start : Float, duration : Float, startVolume : Float, targetVolume : Float, onEnd : Void -> Void };
	var currentVolume : Float; // global volume

	function new() {
	}

	public function getEffect<T:Effect>( etype : Class<T> ) : T {
		for (e in effects) {
			var e = Std.instance(e, etype);<commit_msg>ChannelBase: prevent crash on getEffect when channel has already be released<commit_after>package hxd.snd;

@:allow(hxd.snd.Manager)
class ChannelBase {

	public var priority       : Float = 0.;
	public var mute           : Bool = false;
	public var effects        : Array<Effect> = [];
	public var bindedEffects  : Array<Effect> = [];

	public var volume(default, set) : Float = 1.;
	var currentFade : { start : Float, duration : Float, startVolume : Float, targetVolume : Float, onEnd : Void -> Void };
	var currentVolume : Float; // global volume

	function new() {
	}

	public function getEffect<T:Effect>( etype : Class<T> ) : T {
		if(effects == null) return null;  // Already released
		for (e in effects) {
			var e = Std.instance(e, etype);
{'fraction_non_alphanumeric': 0.12472806381435823, 'fraction_numerical': 0.0029006526468455403, 'mean_word_length': 3.339622641509434, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6236731', 'n_tokens_mistral': 450, 'n_tokens_neox': 420, 'n_words': 141}