Change iOS to use native sound.

This is after the coding session with Paula - mostly just clean up of obsolete code and leftover debugging output.
This commit is contained in:
chrisgarrity 2017-03-08 11:16:31 -05:00
parent 6a6d92e06b
commit e9d0d0d7be
4 changed files with 2 additions and 13 deletions

View file

@ -0,0 +1 @@
../../../src/build/bundles/app.bundle.js.map

View file

@ -53,7 +53,6 @@ function indexFirstTime () {
iOS.hidesplash(doit);
}, 500);
function doit () {
ScratchAudio.sndFX('tap.wav');
window.ontouchend = function () {
indexLoadOptions();
};
@ -88,13 +87,6 @@ function indexLoadOptions () {
}
function indexGohome () {
// On iOS, sounds are loaded async, but the code as written expects to play tap.wav when we enter home.html
// (but since it isn't loaded yet, no sound is played).
// On Android, sync sounds means both calls to tap.wav result in a sound play.
// XXX: we should re-write the lobby loading to wait for the sounds to load, and not play a sound here.
if (isiOS) {
ScratchAudio.sndFX('tap.wav');
}
iOS.setfile('homescroll.sjr', 0, function () {
doNext();
});

View file

@ -185,7 +185,6 @@ export default class iOS {
static registerSound (dir, name, fcn) {
var result = tabletInterface.io_registersound(dir, name);
console.log(result);
if (fcn) {
fcn(result);
}
@ -194,7 +193,6 @@ export default class iOS {
static playSound (name, fcn) {
var result = tabletInterface.io_playsound(name);
console.log(result); // eslint-disable-line no-console
if (fcn) {
fcn(result);
}
@ -210,8 +208,6 @@ export default class iOS {
// Web Wiew delegate call backs
static soundDone (name) {
console.log('soundDone callback, id:', name); // eslint-disable-line no-console
ScratchAudio.soundDone(name);
}

View file

@ -1,5 +1,5 @@
import {isAndroid} from './lib';
import ScratchAudio from './ScratchAudio';
import iOS from '../iPad/iOS';
export default class Sound {
constructor (name, time) {