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

Allow smpl chunk to be read via CLI #27

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ https://github.com/rochars/wavefile
[![Codecov](https://img.shields.io/codecov/c/github/rochars/wavefile.svg?style=flat-square)](https://codecov.io/gh/rochars/wavefile) [![Unix Build](https://img.shields.io/travis/rochars/wavefile.svg?style=flat-square)](https://travis-ci.org/rochars/wavefile) [![Windows Build](https://img.shields.io/appveyor/ci/rochars/wavefile.svg?style=flat-square&logo=appveyor)](https://ci.appveyor.com/project/rochars/wavefile) [![Scrutinizer](https://img.shields.io/scrutinizer/g/rochars/wavefile.svg?style=flat-square&logo=scrutinizer)](https://scrutinizer-ci.com/g/rochars/wavefile/) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1880/badge)](https://bestpractices.coreinfrastructure.org/projects/1880)


## Notice
My country, Brazil, is under a fascist government that is hunting and killing its opponents. I've been threatened too.

# wavefile

Create, read and write wav files according to the specs.

Expand Down
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