o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357819138.852191: @value"æ{I" class:EFI"ProcessedAsset;FI"logical_path;FI"web-app/sound.js;TI" pathname;FI"k/Users/nkr/.rvm/gems/ruby-1.9.3-p327/gems/iugu-ux-0.8.0/vendor/assets/javascripts/web-app/sound.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-06T09:09:15-02:00;FI" length;Fi‹ I" digest;F"%76e632e13285f738c02f712230691edcI" source;FI"‹ (function() { var _Sound; _Sound = (function() { _Sound.prototype.format = $.browser.webkit ? ".mp3" : ".wav"; _Sound.prototype.soundPath = "/assets/s/"; _Sound.prototype.sound = []; _Sound.prototype.environmentSound = null; _Sound.prototype.maxChannels = 8; function _Sound() { var i, _i; this.sound.size = 8; for (i = _i = 0; _i <= 7; i = ++_i) { this.sound[i] = null; } } _Sound.prototype.loadSoundChannel = function(name) { var snd; snd = new Audio(this.soundPath + name + this.format); snd.preload = false; snd.load(); return snd; }; _Sound.prototype.enableDesktopLoop = function(env) { if (typeof env.loop === 'boolean') { return env.loop = true; } else { return env.addEventListener('ended', function() { this.currentTime = 0; return this.play(); }, false); } }; _Sound.prototype.playDesktop = function(name, options) { var aChannel, i, _i; if (options == null) { options = {}; } if (options.environmentSound) { if (this.environmentSound) { this.environmentSound.stop(); } this.environmentSound = this.loadSoundChannel(name); if (options.environmentSound) { this.enableDesktopLoop(this.environmentSound); } this.environmentSound.play(); return; } aChannel = false; for (i = _i = 0; _i <= 8; i = ++_i) { if (this.sound[i] === null) { aChannel = i; break; } else if (this.sound[i] && (this.sound[i].currentTime === this.sound[i].duration || this.sound[i].currentTime === 0)) { aChannel = i; break; } } this.sound[aChannel] = this.loadSoundChannel(name); if (options.environmentSound) { this.enableDesktopLoop(this.sound[aChannel]); } return this.sound[aChannel].play(); }; _Sound.prototype.stopDesktop = function(channel) { if (this.sound[channel] && (this.sound[channel].currentTime === this.sound[channel].duration || this.sound[channel].currentTime === 0)) { return this.sound[channel].stop(); } }; _Sound.prototype.stopEnvironmentDesktop = function() { if (this.environmentSound) { return this.environmentSound.stop(); } }; _Sound.prototype.play = function(name, options) { if (options == null) { options = {}; } if (!IS_MOBILE) { return this.playDesktop(name, options); } }; _Sound.prototype.stop = function(channel) { if (!IS_MOBILE) { return this.stopDesktop(channel); } }; _Sound.prototype.stopEnvironment = function() { if (!IS_MOBILE) { return this.stopEnvironmentDesktop(); } }; return _Sound; })(); window.Sound = new _Sound(); }).call(this); ;TI"dependency_digest;F"%b146b6f4c845c7b2f2011cfc59dc43a2I"required_paths;F[I"k/Users/nkr/.rvm/gems/ruby-1.9.3-p327/gems/iugu-ux-0.8.0/vendor/assets/javascripts/web-app/sound.coffee;TI"dependency_paths;F[{I" path;FI"k/Users/nkr/.rvm/gems/ruby-1.9.3-p327/gems/iugu-ux-0.8.0/vendor/assets/javascripts/web-app/sound.coffee;TI" mtime;FI"2013-01-06T09:09:15-02:00;FI" digest;F"%69017e18515cfc808f7c8ca5abf72b5dI" _version;F"%6776f581a4329e299531e1d52aa59832