0.0.36 • Published 7 years ago
audiobuffer-arraybuffer-serializer v0.0.36
audiobuffer-arraybuffer-serializer
AudioBuffer serializer. Provide a serializer between AudioBuffer and ArrayBuffer.
About ArrayBuffer representation of AudioBuffer see.
Installation
Node.js
npm install audiobuffer-arraybuffer-serializer
const Encoder = require('audiobuffer-arraybuffer-serializer').Encoder;
const Decoder = require('audiobuffer-arraybuffer-serializer').Decoder;
Browser
<script src="aas.js"></script>
<script>
let encoder = new aas.Encoder();
</script>
Usage
Classes
- Encoder
- Serialize AudioBuffer to ArrayBuffer.
- Decoder
- Deserialize ArrayBuffer to AudioBuffer.
Constructor
Set littleEndian
If you want to use specified byte order
// Little endian(default)
let encoder = new Encoder();
let decoder = new Decoder();
// Little endian
let encoder = new Encoder({ littleEndian: true });
let decoder = new Decoder({ littleEndian: true });
// Big endian
let encoder = new Encoder({ littleEndian: false });
let decoder = new Decoder({ littleEndian: false });
Encode/Docode AudioBuffer/ArrayBuffer to ArrayBuffer/AudioBuffer
Simple encode/decode
let arrayBuffer = encoder.execute(audioBuffer);
let audioBuffer = decoder.execute(arrayBuffer);
Set decoded result into destination buffer.
encoder.execute(audioBuffer, arrayBuffer);
decoder.execute(arrayBuffer, audioBuffer);
Examples
Development
Build environment
npm install
Build distributed javascript file(Run unit test)
npm run test-report-dev
Show coverage report
npm run test-browser-dev
open ./coverage/lcov-report/index.html
For | Built file |
---|---|
node.js | ./main.js |
browser | ./aas.js |
Version up
npm version patch
git push origin --tags
Browser test
npm run test-report-dev
open test/index.html
Supported browser
|Chrome|Firefox|
0.0.36
7 years ago
0.0.35
7 years ago
0.0.34
7 years ago
0.0.33
7 years ago
0.0.32
7 years ago
0.0.31
7 years ago
0.0.29
7 years ago
0.0.28
7 years ago
0.0.27
7 years ago
0.0.26
7 years ago
0.0.25
7 years ago
0.0.24
7 years ago
0.0.23
7 years ago
0.0.22
7 years ago
0.0.21
7 years ago
0.0.20
7 years ago
0.0.19
7 years ago
0.0.18
7 years ago
0.0.17
7 years ago
0.0.16
7 years ago
0.0.15
7 years ago
0.0.14
7 years ago
0.0.13
7 years ago
0.0.12
7 years ago
0.0.11
7 years ago
0.0.10
7 years ago
0.0.9
7 years ago
0.0.8
7 years ago
0.0.7
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago
0.0.0
7 years ago