Fixed a bug stopping legacy Audio from starting correctly. Also fixed an issue in the Loader causing it to not load the next file if an unsupported audio file was encountered. Fixed audio playback issues on Firefox/Waterfox as a result.

This commit is contained in:
Richard Davey
2013-09-11 11:33:27 +01:00
parent e79dd5856d
commit 87858d6bbf
9 changed files with 722 additions and 752 deletions
@@ -1,84 +0,0 @@
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmpDM="http://ns.adobe.com/xmp/1.0/DynamicMedia/">
<xmpDM:Tracks>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<xmpDM:trackName>CuePoint Markers</xmpDM:trackName>
<xmpDM:trackType>Cue</xmpDM:trackType>
<xmpDM:frameRate>f44100</xmpDM:frameRate>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpDM:trackName>Subclip Markers</xmpDM:trackName>
<xmpDM:trackType>InOut</xmpDM:trackType>
<xmpDM:frameRate>f44100</xmpDM:frameRate>
</rdf:li>
</rdf:Bag>
</xmpDM:Tracks>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
<xmp:MetadataDate>2013-07-16T02:39:59+01:00</xmp:MetadataDate>
<xmp:ModifyDate>2013-07-16T02:39:59+01:00</xmp:ModifyDate>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#">
<xmpMM:InstanceID>xmp.iid:CF0377343CEDE211B46AA47009D9EF1D</xmpMM:InstanceID>
<xmpMM:DocumentID>xmp.did:CF0377343CEDE211B46AA47009D9EF1D</xmpMM:DocumentID>
<xmpMM:OriginalDocumentID>xmp.did:CE0377343CEDE211B46AA47009D9EF1D</xmpMM:OriginalDocumentID>
<xmpMM:History>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<stEvt:action>saved</stEvt:action>
<stEvt:instanceID>xmp.iid:CE0377343CEDE211B46AA47009D9EF1D</stEvt:instanceID>
<stEvt:when>2013-07-16T02:39:59+01:00</stEvt:when>
<stEvt:softwareAgent>Adobe Audition CS6 (Windows)</stEvt:softwareAgent>
<stEvt:changed>/metadata</stEvt:changed>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<stEvt:action>saved</stEvt:action>
<stEvt:instanceID>xmp.iid:CF0377343CEDE211B46AA47009D9EF1D</stEvt:instanceID>
<stEvt:when>2013-07-16T02:39:59+01:00</stEvt:when>
<stEvt:softwareAgent>Adobe Audition CS6 (Windows)</stEvt:softwareAgent>
<stEvt:changed>/</stEvt:changed>
</rdf:li>
</rdf:Seq>
</xmpMM:History>
<xmpMM:DerivedFrom rdf:parseType="Resource">
<stRef:instanceID>xmp.iid:CE0377343CEDE211B46AA47009D9EF1D</stRef:instanceID>
<stRef:documentID>xmp.did:CE0377343CEDE211B46AA47009D9EF1D</stRef:documentID>
<stRef:originalDocumentID>xmp.did:CE0377343CEDE211B46AA47009D9EF1D</stRef:originalDocumentID>
</xmpMM:DerivedFrom>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:format>audio/ogg; codec="vorbis"</dc:format>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
+20 -2
View File
@@ -1,6 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<title>phaser.js - a new beginning</title>
<?php
require('js.php');
@@ -15,9 +16,11 @@
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update, render: render });
function preload() {
game.load.image('disk', 'assets/sprites/ra_dont_crack_under_pressure.png');
//game.load.audio('wizball', ['assets/mp3/oedipus_wizball_highscore.ogg', 'assets/mp3/oedipus_wizball_highscore.mp3']);
game.load.audio('boden', ['assets/audio/bodenstaendig_2000_in_rock_4bit.mp3']);
// Firefox doesn't support mp3 files, so use ogg
game.load.audio('boden', ['assets/audio/bodenstaendig_2000_in_rock_4bit.mp3', 'assets/audio/bodenstaendig_2000_in_rock_4bit.ogg']);
}
@@ -34,6 +37,21 @@
s = game.add.sprite(game.world.centerX, game.world.centerY, 'disk');
s.anchor.setTo(0.5, 0.5);
game.input.onDown.add(changeVolume, this);
}
function changeVolume(pointer) {
if (pointer.y < 300)
{
music.volume += 0.1;
}
else
{
music.volume -= 0.1;
}
}
function update() {