o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1372441616.480542: @value"{I" class:EFI"ProcessedAsset;FI"logical_path;F"web-app/sound.jsI" pathname;F"_/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/web-app/sound.coffeeI"content_type;FI"application/javascript;FI" mtime;FI"2012-10-02T20:05:24-03:00;FI" length;Fi I" digest;F"%33e6cbc0c3f0cca29560878412be7d28I" 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"%4407442e37f2da00f27405087c600332I"required_paths;F["_/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/web-app/sound.coffeeI"dependency_paths;F[{I" path;F"_/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/web-app/sound.coffeeI" mtime;FI"2012-10-02T20:05:24-03:00;FI" digest;F"%69017e18515cfc808f7c8ca5abf72b5dI" _version;F"%6776f581a4329e299531e1d52aa59832