diff --git a/bin/Darwin/wav2json b/bin/Darwin/wav2json index f90e720..3520438 100755 Binary files a/bin/Darwin/wav2json and b/bin/Darwin/wav2json differ diff --git a/src/main.cpp b/src/main.cpp index bbec7f8..b9e8dd4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -65,6 +65,11 @@ int main(int argc, char* argv[]) // open sound file SndfileHandle wav(options.input_file_name.c_str()); + // output sound duration + if (i == 0) { + ofs << " \"duration\":" << wav.frames()/wav.samplerate() << "," << std::endl; + } + // handle error if ( wav.error() ) {