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

@ -182,4 +182,10 @@ size_t MPG123Decoder::getSampleOffset()
return mpg123_tell(MPG123);
}
size_t MPG123Decoder::getSampleLength()
{
off_t len = mpg123_length(MPG123);
return (len > 0) ? len : 0;
}
#endif