Issue #12940: Fixed a bug that is removing SimpleAudio play

This commit is contained in:
VisualSj 2015-07-24 17:41:01 +08:00
parent fc8858523f
commit cf70cb9c40
1 changed files with 5 additions and 7 deletions

View File

@ -1177,15 +1177,13 @@
*/
parser.initSimpleAudio = function(json, resourcePath){
var node = new ccs.ComAudio();
var loop = json["Loop"] || false;
var volume = json["Volume"] || 0;
cc.audioEngine.setMusicVolume(volume);
//var name = json["Name"];
//var volume = json["Volume"] || 0;
//cc.audioEngine.setMusicVolume(volume);
node.setLoop(loop);
loadTexture(json["FileData"], resourcePath, function(path, type){
cc.loader.load(path, function(){
cc.audioEngine.playMusic(path, loop);
});
node.setFile(path);
});
};