Skip to content

Commit

Permalink
Update to libopenmpt 0.4 and use WASM.
Browse files Browse the repository at this point in the history
  • Loading branch information
sagamusix committed Dec 23, 2018
1 parent a1b608b commit b69bf73
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 23 deletions.
16 changes: 14 additions & 2 deletions js/.htaccess
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
FileETag None

<Files *.gz>
<Files *.js.gz>
AddType "text/javascript" .gz
AddEncoding gzip .gz
</Files>

<Files *.br>
<Files *.js.br>
AddType "text/javascript" .br
AddEncoding br .br
</Files>

<Files *.wasm.gz>
AddType "application/wasm" .gz
AddEncoding gzip .gz
</Files>

<Files *.wasm.br>
AddType "application/wasm" .br
AddEncoding br .br
</Files>

AddType "application/wasm" .wasm

RewriteEngine On

RewriteCond %{HTTP:Accept-Encoding} br
Expand Down
9 changes: 7 additions & 2 deletions js/chiptune2.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,13 @@ function play(elem)
var js = document.createElement('script');
js.type = 'text/javascript';
js.id = 'libopenmpt';
js.src = basepath + 'js/libopenmpt.php';
js.onload = handler = function(event) { libopenmpt_play(elem); };
js.src = basepath + 'js/libopenmpt.js';
js.onload = handler = function(event)
{
libopenmpt.onRuntimeInitialized = _ => {
libopenmpt_play(elem);
};
};
document.body.appendChild(js);
} else
{
Expand Down
20 changes: 1 addition & 19 deletions js/libopenmpt.js

Large diffs are not rendered by default.

Binary file modified js/libopenmpt.js.br
Binary file not shown.
Binary file modified js/libopenmpt.js.gz
Binary file not shown.
Binary file removed js/libopenmpt.js.mem
Binary file not shown.
Binary file removed js/libopenmpt.js.mem.br
Binary file not shown.
Binary file removed js/libopenmpt.js.mem.gz
Binary file not shown.
Binary file added js/libopenmpt.wasm
Binary file not shown.
Binary file added js/libopenmpt.wasm.br
Binary file not shown.
Binary file added js/libopenmpt.wasm.gz
Binary file not shown.

0 comments on commit b69bf73

Please sign in to comment.