Skip to content

Commit f79f758

Browse files
authored
Merge pull request #5 from kmturley/feature/list-smpl
Allow smpl chunk to be read via CLI
2 parents 9ebeadd + b1bcf20 commit f79f758

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/wavefile.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ const help = " Usage:\n" +
6767
" --list-cue Ex: wavefile input.wav --list-cue\n" +
6868
" Print all the cue points of the file.\n" +
6969
"\n" +
70+
" --list-smpl Ex: wavefile input.wav --list-smpl\n" +
71+
" Print all the sample chunks from the file.\n" +
72+
"\n" +
7073
" --bits Ex: wavefile input.wav --bits\n" +
7174
" Print the bit depth of the file.\n" +
7275
"\n" +
@@ -157,6 +160,9 @@ for (let command in commands) {
157160
// --list-cue
158161
} else if (command == '--list-cue') {
159162
console.log(wav.listCuePoints());
163+
// --list-smpl
164+
} else if (command == '--list-smpl') {
165+
console.log(wav.smpl);
160166
// --bits
161167
} else if (command == '--bits') {
162168
if (wav.fmt.validBitsPerSample) {

0 commit comments

Comments
 (0)