Skip to content

Commit

Permalink
Set num channels to 1 if not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
thess committed Aug 27, 2018
1 parent 7d33e31 commit 59d3471
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

AC_PREREQ([2.69])
AC_INIT([pianod],
174.07-sc,
174.08-sc,
[[email protected]],
,[http://deviousfish.com/pianod])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
Expand Down
4 changes: 2 additions & 2 deletions src/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static WaitressCbReturn_t BarPlayerAACCb (void *ptr, size_t size,
player->songPlayed += (unsigned long long int) frameInfo.samples *
(unsigned long long int) BAR_PLAYER_MS_TO_S_FACTOR /
(unsigned long long int) player->samplerate /
(unsigned long long int) player->channels;
(unsigned long long int) (player->channels ? player->channels : 1);
}
if (player->sampleSizeCurr >= player->sampleSizeN) {
/* no more frames, drop data */
Expand Down Expand Up @@ -335,7 +335,7 @@ static WaitressCbReturn_t BarPlayerAACCb (void *ptr, size_t size,
player->songDuration = (unsigned long long int) player->sampleSizeN *
4096LL * (unsigned long long int) BAR_PLAYER_MS_TO_S_FACTOR /
(unsigned long long int) player->samplerate /
(unsigned long long int) player->channels;
(unsigned long long int) (player->channels ? player->channels : 1);
break;
} else {
memcpy (&player->sampleSize[player->sampleSizeCurr],
Expand Down

0 comments on commit 59d3471

Please sign in to comment.