audio-player: switched order of HTML elements and commented adpcm tables

This commit is contained in:
Trek H 2019-09-06 14:39:20 +09:30
parent ab56f0f597
commit fa2ae7b9c7
2 changed files with 10 additions and 6 deletions

View File

@ -27,11 +27,13 @@ LICENSE
Reference algorithms for ADPCM compression and decompression are in part 6. Reference algorithms for ADPCM compression and decompression are in part 6.
*/ */
// Table of index changes (see spec).
const indexTable = [ const indexTable = [
-1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8,
-1, -1, -1, -1, 2, 4, 6, 8 -1, -1, -1, -1, 2, 4, 6, 8
]; ];
// Quantize step size table (see spec).
const stepTable = [ const stepTable = [
7, 8, 9, 10, 11, 12, 13, 14, 7, 8, 9, 10, 11, 12, 13, 14,
16, 17, 19, 21, 23, 25, 28, 31, 16, 17, 19, 21, 23, 25, 28, 31,

View File

@ -13,6 +13,14 @@
<body style="height: 100%" onload="load();"> <body style="height: 100%" onload="load();">
<div class="card m-auto" style="width: 40rem;"> <div class="card m-auto" style="width: 40rem;">
<div class="card-body"> <div class="card-body">
<div class="container-fluid">
URL: <input type="text" id="url" class="url mb-3 mx-3" onchange="load();"><button onclick="load();">Load</button>
</div>
<div class="container-fluid">
<a id="link" href=""></a>
</div>
<div style="height: 1rem">
</div>
<div class="container-fluid"> <div class="container-fluid">
<div class="form-group"> <div class="form-group">
<input class="form-control-file" type="file" id="fileinput" onchange="processData();"> <input class="form-control-file" type="file" id="fileinput" onchange="processData();">
@ -24,12 +32,6 @@
<source id="source" src="" type="audio/wav" /> <source id="source" src="" type="audio/wav" />
</audio> </audio>
</div> </div>
<div class="container-fluid">
URL: <input type="text" id="url" class="url mb-3 mx-3" onchange="load();"><button onclick="load();">Load</button>
</div>
<div class="container-fluid">
<a id="link" href=""></a>
</div>
</div> </div>
</div> </div>
<footer id="sticky-footer" class="footer fixed-bottom py-4 bg-dark text-white-50" style="width: 100%;"> <footer id="sticky-footer" class="footer fixed-bottom py-4 bg-dark text-white-50" style="width: 100%;">