From 910940d632cc7e1c9c1a7cfa284011f2c50347f0 Mon Sep 17 00:00:00 2001 From: jrwarwick Date: Thu, 25 Apr 2024 13:30:48 -0700 Subject: [PATCH] Add m4a/aac file type to list of supported types, and include public domain demo file. --- README.md | 6 ++++-- index.html | 6 ++++-- sound.js | 8 +++++--- sounds/wapo_march.m4a | Bin 0 -> 51922 bytes 4 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 sounds/wapo_march.m4a diff --git a/README.md b/README.md index 3d1b607..c720740 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ You can use it as-as, or integrate it into your existing framework. At its heart it's composed of just two, short, independent functions: `makeSound` and `soundEffect`. The `makeSound` function helps you -load and play sound files (mp3, wav, ogg, and webm). The `soundEffect` +load and play sound files (mp3, mp4, wav, ogg, and webm). The `soundEffect` function helps you generate a wide range of sound and music effects from pure code. These two functions are completely modular and free of dependencies, so @@ -46,7 +46,8 @@ method's array. Then assign a callback function to `sounds.whenLoaded`. sounds.load([ "sounds/shoot.wav", "sounds/music.wav", - "sounds/bounce.mp3" + "sounds/bounce.mp3", + "sounds/wapo_march.m4a" ]); //Assign the callback function that should run @@ -84,6 +85,7 @@ they're easier to work with: var shoot = sounds["sounds/shoot.wav"], music = sounds["sounds/music.wav"], bounce = sounds["sounds/bounce.mp3"]; + bounce = sounds["sounds/wapo_march.mp4"]; ``` You now have three sound objects, `shoot`, `music`, and `bounce` that you can play and control. diff --git a/index.html b/index.html index 1194ee0..4efe452 100644 --- a/index.html +++ b/index.html @@ -28,8 +28,9 @@

- hyperlink trigger (bounce) + Hyperlink trigger #1 (bounce) + Hyperlink trigger #2 (wapo march)