Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisn committed Jan 22, 2024
1 parent 87b25f3 commit 30bec8d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ either -1 (default compression) or between 0 (fastest) and 9 (best compression).

#### `--raw-samplerate`

When using raw input audio format, this must be set to the appropriate samplerate.
When using raw input audio format, this must be set to the appropriate sample
rate, in Hz.

#### `--raw-channels`

Expand Down
2 changes: 1 addition & 1 deletion doc/audiowaveform.1
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ either -1 (default compression) or between 0 (fastest) and 9 (best compression).
.TP
.B --raw-samplerate\fR <rate>
When using raw input audio format, this must be set to the appropriate
samplerate.
sample rate, in Hz.

.TP
.B --raw-channels\fR <n>
Expand Down
5 changes: 3 additions & 2 deletions src/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ bool Options::parseCommandLine(int argc, const char* const* argv)
)(
"raw-samplerate",
po::value<int>(&raw_samplerate_),
"samplerate for raw audio input"
"sample rate for raw audio input (Hz)"
)(
"raw-channels",
po::value<int>(&raw_channels_),
Expand Down Expand Up @@ -340,7 +340,8 @@ bool Options::parseCommandLine(int argc, const char* const* argv)
reportError("Invalid bits: must be either 8 or 16");
return false;
}
else if (png_compression_level_ < -1 || png_compression_level_ > 9) {

if (png_compression_level_ < -1 || png_compression_level_ > 9) {
reportError("Invalid compression level: must be from 0 (none) to 9 (best), or -1 (default)");
return false;
}
Expand Down
5 changes: 2 additions & 3 deletions src/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@

//------------------------------------------------------------------------------

#include "Rgba.h"
#include "AudioFileReader.h"
#include "FileFormat.h"
#include "Rgba.h"

#include <boost/filesystem.hpp>
#include <boost/program_options.hpp>

#include <iosfwd>
#include <string>
#include <stdexcept>
#include <string>

//------------------------------------------------------------------------------

Expand Down

0 comments on commit 30bec8d

Please sign in to comment.