Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Typescript types for fmt and data chunks #29

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
e9e7ae1
Update about death threats and my status
rochars Feb 11, 2020
06b9a3d
Update README
rochars Feb 12, 2020
ac30e4c
Moving away from GitHub
rochars Mar 8, 2020
7777edd
Reading the cart, mext, and extended fmt chunks
kookster May 27, 2020
c1fe504
Writing the cart, mext, and extended fmt chunks
kookster May 27, 2020
499266d
Normalize on bitRate case
kookster May 27, 2020
6b47010
Add an mpeg parser
kookster May 27, 2020
3381ec5
Create wavs fro mpegs
kookster May 27, 2020
1349344
Add extern definitions and typescript update, minor test update, upda…
kookster May 27, 2020
2660f9a
Add in build results from dist and docs
kookster May 27, 2020
0621ad4
Prevent rollup from messing up channel mode names
kookster May 30, 2020
3cfd86f
fix postTimer parsing to follow the spec
kookster Jul 30, 2020
a423e98
Check in built dist file and test result files
kookster Jul 31, 2020
32cee09
Merge pull request #1 from kookster/feat/cart_chunk
kookster Jul 31, 2020
d3278fa
Get ready to release fork to npm
kookster Jul 31, 2020
8e7d90f
Also update the lock file before release
kookster Jul 31, 2020
a0626f5
Update README for fork, including new mpeg, mext and cart features
kookster Aug 3, 2020
a0eb954
The End
rochars Sep 2, 2020
2b60d13
Remove donation links
rochars Apr 16, 2021
b904b07
Correctly calc mext sound info for 44.1 and no padding
kookster Apr 29, 2022
89e46cc
Update g closure compiler, bin name from package
kookster Apr 29, 2022
9a70003
Test and build result changes
kookster Apr 29, 2022
0fe6c91
Bump
kookster Apr 29, 2022
daaac71
Update package info
kookster Apr 29, 2022
806bccb
bump
kookster Apr 29, 2022
11b55a8
Merge pull request #2 from PRX/fix/mext_soundinfo_math
kookster Apr 29, 2022
f9311ad
Update README
rochars May 9, 2022
51258f2
Make reading wav, expecting pad bytes, optional
kookster Aug 2, 2022
9e30e8f
Make writing pad bytes optional
kookster Aug 2, 2022
b8988cd
Add a test to show padByte changes file size
kookster Aug 2, 2022
77296c4
Add padBytes attribute to specs
kookster Aug 2, 2022
9933b72
Commit the updated dist
kookster Aug 2, 2022
e467227
Merge pull request #3 from PRX/feat/configure_pad_bytes
kookster Aug 3, 2022
287b1c2
Bump version
kookster Aug 3, 2022
b1bcf20
Allow smpl chunk to be read via CLI
kmturley Oct 12, 2022
fb9dae8
Reading the cart, mext, and extended fmt chunks
kookster May 27, 2020
58a0aaf
Writing the cart, mext, and extended fmt chunks
kookster May 27, 2020
d71dd33
Normalize on bitRate case
kookster May 27, 2020
09be709
Add an mpeg parser
kookster May 27, 2020
b97bcd4
Create wavs fro mpegs
kookster May 27, 2020
6eef506
Add extern definitions and typescript update, minor test update, upda…
kookster May 27, 2020
16003f6
Add in build results from dist and docs
kookster May 27, 2020
e35c947
Prevent rollup from messing up channel mode names
kookster May 30, 2020
d705e6d
fix postTimer parsing to follow the spec
kookster Jul 30, 2020
5d3b782
Check in built dist file and test result files
kookster Jul 31, 2020
259ee07
Get ready to release fork to npm
kookster Jul 31, 2020
b73a375
Also update the lock file before release
kookster Jul 31, 2020
2109845
Update README for fork, including new mpeg, mext and cart features
kookster Aug 3, 2020
0c29b45
Correctly calc mext sound info for 44.1 and no padding
kookster Apr 29, 2022
4d5dede
Update g closure compiler, bin name from package
kookster Apr 29, 2022
8142917
Test and build result changes
kookster Apr 29, 2022
521da2e
Bump
kookster Apr 29, 2022
5db40ec
Update package info
kookster Apr 29, 2022
629ca53
bump
kookster Apr 29, 2022
f64dc67
Make reading wav, expecting pad bytes, optional
kookster Aug 2, 2022
7a04ed8
Make writing pad bytes optional
kookster Aug 2, 2022
dae458e
Add a test to show padByte changes file size
kookster Aug 2, 2022
3274868
Add padBytes attribute to specs
kookster Aug 2, 2022
cd94d51
Commit the updated dist
kookster Aug 2, 2022
c3a7bf3
Bump version
kookster Aug 3, 2022
9ebeadd
Merge branch 'rochars-master'
kookster Oct 12, 2022
f79f758
Merge pull request #5 from kmturley/feature/list-smpl
kookster Oct 12, 2022
075e220
Update references in README
kookster Nov 14, 2022
fd962d8
Use separate exports for ES and CommonJS modules
rejc2 Jan 23, 2023
b023873
Add Typescript types for fmt and data chunks
rejc2 Jan 23, 2023
aefc4be
Merge pull request #7 from rejc2/rejc2/esm-wrapper
kookster Feb 17, 2023
dfa387c
Merge pull request #8 from rejc2/rejc2/typescript
kookster Feb 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
795 changes: 556 additions & 239 deletions README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions bin/wavefile.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ const help = " Usage:\n" +
" --list-cue Ex: wavefile input.wav --list-cue\n" +
" Print all the cue points of the file.\n" +
"\n" +
" --list-smpl Ex: wavefile input.wav --list-smpl\n" +
" Print all the sample chunks from the file.\n" +
"\n" +
" --bits Ex: wavefile input.wav --bits\n" +
" Print the bit depth of the file.\n" +
"\n" +
Expand Down Expand Up @@ -157,6 +160,9 @@ for (let command in commands) {
// --list-cue
} else if (command == '--list-cue') {
console.log(wav.listCuePoints());
// --list-smpl
} else if (command == '--list-smpl') {
console.log(wav.smpl);
// --bits
} else if (command == '--bits') {
if (wav.fmt.validBitsPerSample) {
Expand Down
188 changes: 104 additions & 84 deletions dist/wavefile.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/wrapper.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import cjsModule from './wavefile.js';

export const WaveFile = cjsModule.WaveFile;
556 changes: 369 additions & 187 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<nav >

<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module-wavefile.WaveFile.html">WaveFile</a><ul class='methods'><li data-type='method'><a href="module-wavefile.WaveFile.html#deleteCuePoint">deleteCuePoint</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#deleteTag">deleteTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromALaw">fromALaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromBase64">fromBase64</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromBuffer">fromBuffer</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromDataURI">fromDataURI</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromIMAADPCM">fromIMAADPCM</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromMuLaw">fromMuLaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromScratch">fromScratch</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#get_PMX">get_PMX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getiXML">getiXML</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getLISTIndex">getLISTIndex</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getSample">getSample</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getSamples">getSamples</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getTag">getTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#listCuePoints">listCuePoints</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#listTags">listTags</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#set_PMX">set_PMX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setCuePoint">setCuePoint</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setiXML">setiXML</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setSample">setSample</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setTag">setTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toALaw">toALaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBase64">toBase64</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBitDepth">toBitDepth</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBuffer">toBuffer</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toDataURI">toDataURI</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toIMAADPCM">toIMAADPCM</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toMuLaw">toMuLaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toRIFF">toRIFF</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toRIFX">toRIFX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toSampleRate">toSampleRate</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#updateLabel">updateLabel</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-wavefile.html">wavefile</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module-wavefile.WaveFile.html">WaveFile</a><ul class='methods'><li data-type='method'><a href="module-wavefile.WaveFile.html#deleteCuePoint">deleteCuePoint</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#deleteTag">deleteTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromALaw">fromALaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromBase64">fromBase64</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromBuffer">fromBuffer</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromDataURI">fromDataURI</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromIMAADPCM">fromIMAADPCM</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromMpeg">fromMpeg</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromMuLaw">fromMuLaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromScratch">fromScratch</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#get_PMX">get_PMX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getiXML">getiXML</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getLISTIndex">getLISTIndex</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getSample">getSample</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getSamples">getSamples</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getTag">getTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#listCuePoints">listCuePoints</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#listTags">listTags</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#mpegCodingHistory_">mpegCodingHistory_</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#mpegHeadFlags_">mpegHeadFlags_</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#mpegHeadMode_">mpegHeadMode_</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#mpegHeadModeExt_">mpegHeadModeExt_</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#set_PMX">set_PMX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setCuePoint">setCuePoint</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setiXML">setiXML</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setSample">setSample</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setTag">setTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toALaw">toALaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBase64">toBase64</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBitDepth">toBitDepth</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBuffer">toBuffer</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toDataURI">toDataURI</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toIMAADPCM">toIMAADPCM</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toMuLaw">toMuLaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toRIFF">toRIFF</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toRIFX">toRIFX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toSampleRate">toSampleRate</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#updateLabel">updateLabel</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-wavefile.html">wavefile</a></li></ul>
</nav>

<div id="main">
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_wavefile-converter.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<nav >

<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module-wavefile.WaveFile.html">WaveFile</a><ul class='methods'><li data-type='method'><a href="module-wavefile.WaveFile.html#deleteCuePoint">deleteCuePoint</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#deleteTag">deleteTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromALaw">fromALaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromBase64">fromBase64</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromBuffer">fromBuffer</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromDataURI">fromDataURI</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromIMAADPCM">fromIMAADPCM</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromMuLaw">fromMuLaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromScratch">fromScratch</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#get_PMX">get_PMX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getiXML">getiXML</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getLISTIndex">getLISTIndex</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getSample">getSample</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getSamples">getSamples</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getTag">getTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#listCuePoints">listCuePoints</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#listTags">listTags</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#set_PMX">set_PMX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setCuePoint">setCuePoint</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setiXML">setiXML</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setSample">setSample</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setTag">setTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toALaw">toALaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBase64">toBase64</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBitDepth">toBitDepth</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBuffer">toBuffer</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toDataURI">toDataURI</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toIMAADPCM">toIMAADPCM</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toMuLaw">toMuLaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toRIFF">toRIFF</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toRIFX">toRIFX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toSampleRate">toSampleRate</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#updateLabel">updateLabel</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-wavefile.html">wavefile</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module-wavefile.WaveFile.html">WaveFile</a><ul class='methods'><li data-type='method'><a href="module-wavefile.WaveFile.html#deleteCuePoint">deleteCuePoint</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#deleteTag">deleteTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromALaw">fromALaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromBase64">fromBase64</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromBuffer">fromBuffer</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromDataURI">fromDataURI</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromIMAADPCM">fromIMAADPCM</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromMpeg">fromMpeg</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromMuLaw">fromMuLaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#fromScratch">fromScratch</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#get_PMX">get_PMX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getiXML">getiXML</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getLISTIndex">getLISTIndex</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getSample">getSample</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getSamples">getSamples</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#getTag">getTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#listCuePoints">listCuePoints</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#listTags">listTags</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#mpegCodingHistory_">mpegCodingHistory_</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#mpegHeadFlags_">mpegHeadFlags_</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#mpegHeadMode_">mpegHeadMode_</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#mpegHeadModeExt_">mpegHeadModeExt_</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#set_PMX">set_PMX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setCuePoint">setCuePoint</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setiXML">setiXML</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setSample">setSample</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#setTag">setTag</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toALaw">toALaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBase64">toBase64</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBitDepth">toBitDepth</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toBuffer">toBuffer</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toDataURI">toDataURI</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toIMAADPCM">toIMAADPCM</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toMuLaw">toMuLaw</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toRIFF">toRIFF</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toRIFX">toRIFX</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#toSampleRate">toSampleRate</a></li><li data-type='method'><a href="module-wavefile.WaveFile.html#updateLabel">updateLabel</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-wavefile.html">wavefile</a></li></ul>
</nav>

<div id="main">
Expand Down
Loading