/*
-** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2005 David Viens <davidv@plogue.com>
**
** This program is free software; you can redistribute it and/or modify
if (psf->sf.channels < 1)
return SFE_CHANNEL_COUNT_ZERO ;
- if (psf->sf.channels >= SF_MAX_CHANNELS)
+ if (psf->sf.channels > SF_MAX_CHANNELS)
return SFE_CHANNEL_COUNT ;
if (! (found_chunk & HAVE_FORM))
psf_log_printf (psf, " Sample Rate : %d\n", samplerate) ;
psf_log_printf (psf, " Frames : %u%s\n", comm_fmt->numSampleFrames, (comm_fmt->numSampleFrames == 0 && psf->filelength > 104) ? " (Should not be 0)" : "") ;
- if (comm_fmt->numChannels < 1 || comm_fmt->numChannels >= SF_MAX_CHANNELS)
+ if (comm_fmt->numChannels < 1 || comm_fmt->numChannels > SF_MAX_CHANNELS)
{ psf_log_printf (psf, " Channels : %d (should be >= 1 and < %d)\n", comm_fmt->numChannels, SF_MAX_CHANNELS) ;
return SFE_CHANNEL_COUNT_BAD ;
} ;
/*
-** Copyright (C) 2008-2017 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2018 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2009 Uli Franke <cls@nebadje.org>
**
** This program is free software; you can redistribute it and/or modify
if (psf->sf.channels < 1)
return SFE_CHANNEL_COUNT_ZERO ;
- if (psf->sf.channels >= SF_MAX_CHANNELS)
+ if (psf->sf.channels > SF_MAX_CHANNELS)
return SFE_CHANNEL_COUNT ;
/* WAVs can be little or big endian */
/*
-** Copyright (C) 1999-2017 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
if (psf->sf.channels < 1)
return SFE_CHANNEL_COUNT_ZERO ;
- if (psf->sf.channels >= SF_MAX_CHANNELS)
+ if (psf->sf.channels > SF_MAX_CHANNELS)
return SFE_CHANNEL_COUNT ;
psf->endian = SF_ENDIAN_LITTLE ; /* All W64 files are little endian. */
if (psf->sf.channels < 1)
return SFE_CHANNEL_COUNT_ZERO ;
- if (psf->sf.channels >= SF_MAX_CHANNELS)
+ if (psf->sf.channels > SF_MAX_CHANNELS)
return SFE_CHANNEL_COUNT ;
if (format != WAVE_FORMAT_PCM && (parsestage & HAVE_fact) == 0)