debugger22 / github-audio

Listen to music generated by events happening across GitHub :octocat: 🎷

Home Page:https://github.audio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How does the sound loading work?

treymerkley opened this issue · comments

Looking at the code from the main.js file:
`
// Load sounds
for (var i = 1; i <= 24; i++) {
if (i > 9) {
fn = 'c0' + i;
} else {
fn = 'c00' + i;
}
celesta.push(new Howl({
src : ['https://d1fz9d31zqor6x.cloudfront.net/sounds/celesta/' + fn + '.ogg',
'https://d1fz9d31zqor6x.cloudfront.net/sounds/celesta/' + fn + '.mp3'],
volume : 0.7,
onload : sound_load(),
buffer: true,
}))
clav.push(new Howl({
src : ['https://d1fz9d31zqor6x.cloudfront.net/sounds/clav/' + fn + '.ogg',
'https://d1fz9d31zqor6x.cloudfront.net/sounds/clav/' + fn + '.mp3'],
volume : 0.4,
onload : sound_load(),
buffer: true,
}))
}

for (var i = 1; i <= 3; i++) {
swells.push(new Howl({
src : ['https://d1fz9d31zqor6x.cloudfront.net/sounds/swells/swell' + i + '.ogg',
'https://d1fz9d31zqor6x.cloudfront.net/sounds/swells/swell' + i + '.mp3'],
volume : 1,
onload : sound_load(),
buffer: true,
}));
}

Howler.volume(volume);
`
It looks like the sounds are remotely hosted, but the sounds folder is populated with ogg files. Are those fallbacks, and can I replace them to change the sound output?