Get the length from sounds when possible

This commit is contained in:
Chris Robinson 2014-06-25 21:14:35 -07:00
commit c6bb52c866
6 changed files with 22 additions and 2 deletions

View file

@ -106,4 +106,9 @@ size_t SndFileDecoder::getSampleOffset()
return sf_seek(SndFile, 0, SEEK_CUR);
}
size_t SndFileDecoder::getSampleLength()
{
return (SndInfo.frames > 0) ? SndInfo.frames : 0;
}
#endif