Skip to content

Commit

Permalink
Allow --bar-gap option to be set to zero
Browse files Browse the repository at this point in the history
See #208
  • Loading branch information
chrisn committed Aug 14, 2024
1 parent 6424986 commit fac1d0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ as vertical bars. The `--bar-width`, `--bar-gap`, and `--bar-style` options
customize the immage:

audiowaveform -i test.mp3 -o test.png -w 1000 -h 200 -z auto \
--waveform-style bars --bar-width 10 --bar-gap 2 --bar-style round
--waveform-style bars --bar-width 10 --bar-gap 2 --bar-style rounded

You can use the `--split-channels` option to create a waveform data file
containing multiple channels, rather than combining all channels into a single
Expand Down
4 changes: 2 additions & 2 deletions src/GdImageRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ bool GdImageRenderer::setBarStyle(
return false;
}

if (bar_gap < 1) {
log(Error) << "Invalid bar gap: minimum 1\n";
if (bar_gap < 0) {
log(Error) << "Invalid bar gap: minimum 0\n";
return false;
}

Expand Down

0 comments on commit fac1d0c

Please sign in to comment.