Skip to content

Commit

Permalink
aplay: allow to compile with older alsa-lib (subformat)
Browse files Browse the repository at this point in the history
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
perexg committed Dec 12, 2023
1 parent d55cd9f commit 8e6351f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aplay/aplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,12 @@ int main(int argc, char *argv[])
}
break;
case OPT_SUBFORMAT:
#if SND_LIB_VER(1, 2, 10) < SND_LIB_VERSION
rhwparams.subformat = snd_pcm_subformat_value(optarg);
if (rhwparams.subformat == SND_PCM_SUBFORMAT_UNKNOWN) {
#else
if (strcasecmp(optarg, "std") != 0 && strcasecmp(optarg, "standard") != 0) {
#endif
error(_("wrong extended subformat '%s'"), optarg);
prg_exit(EXIT_FAILURE);
}
Expand Down

0 comments on commit 8e6351f

Please sign in to comment.