<commit_before>//
//  GKSound.hx
//
//  Created by <NAME> on 2010-12-09.
//  Copyright (c) 2010 ralcr.com. 
//	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
//

class GKSound {
	
	static var mp3s :Hash<RCAudio>;
	
	
	public static function init () :Void {
		
		if (mp3s != null) return;
		
		//sounds = new Hash<Sound>();
		mp3s = new Hash<RCAudio>();
	}
	
	
	public static function registerSound (id:String, linkage:String) {
		
	}
	public static function registerMp3 (id:String, mp3:RCAudio) {
		mp3s.set (id, mp3);
	}
	
	public static function playMp3 (id:String) :Void {
		if (mp3s.get ( id ) != null)
			mp3s.get ( id ).start();
	}
	public static function stopMp3 (id:String) :Void {
		if (mp3s.get ( id ) != null)
			mp3s.get ( id ).stop();
	}
	
}<commit_msg>Add mute/unmute to all running sounds<commit_after>//
//  GKSound.hx
//
//  Created by <NAME> on 2010-12-09.
//  Copyright (c) 2010 ralcr.com. 
//	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
//

class GKSound {
	
	static var mp3s :Hash<RCAudio>;
	
	
	public static function init () :Void {
		
		if (mp3s != null) return;
		
		//sounds = new Hash<Sound>();
		mp3s = new Hash<RCAudio>();
	}
	
	
	public static function registerSound (id:String, linkage:String) {
		
	}
	public static function registerMp3 (id:String, mp3:RCAudio) {
		mp3s.set (id, mp3);
	}
	
	public static function playMp3 (id:String) :Void {
		if (mp3s.get ( id ) != null)
			mp3s.get ( id ).start();
	}
	public static function stopMp3 (id:String) :Void {
		if (mp3s.get ( id ) != null)
			mp3s.get ( id ).stop();
	}
	
	public static function mute (b:Bool) :Void {
		for (mp3 in mp3s)
			mp3.setVolume ( b ? 1 : 0 );
	}
}
{'fraction_non_alphanumeric': 0.15240793201133143, 'fraction_numerical': 0.031161473087818695, 'mean_word_length': 2.9685393258426966, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 23, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4181292', 'n_tokens_mistral': 757, 'n_tokens_neox': 680, 'n_words': 183}