Skip to content

Commit

Permalink
fix endianness test for WavPack format
Browse files Browse the repository at this point in the history
  • Loading branch information
marclava committed May 19, 2024
1 parent a1c9cf1 commit 1901945
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sndfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,8 @@ sf_format_check (const SF_INFO *info)
break ;

case SF_FORMAT_WAVPACK :
if (endian != SF_ENDIAN_FILE)
/* WavPack is strictly little endian. */
if (endian == SF_ENDIAN_BIG || endian == SF_ENDIAN_CPU)
return 0 ;
if (subformat == SF_FORMAT_PCM_S8 || subformat == SF_FORMAT_PCM_U8 || subformat == SF_FORMAT_PCM_16 || subformat == SF_FORMAT_PCM_24 || subformat == SF_FORMAT_PCM_32)
return 1 ;
Expand Down

0 comments on commit 1901945

Please sign in to comment.