Use stb_vorbis api to get current sample offset

This commit is contained in:
Joel16 2019-04-07 18:44:24 -05:00
parent 48ea21c78d
commit 6cb2f289da

View File

@ -28,7 +28,8 @@ SceUInt8 OGG_GetChannels(void) {
}
void OGG_Decode(void *buf, unsigned int length, void *userdata) {
samples_read += stb_vorbis_get_samples_short_interleaved(ogg, ogg_info.channels, (short *)buf, (int)length * ogg_info.channels);
stb_vorbis_get_samples_short_interleaved(ogg, ogg_info.channels, (short *)buf, (int)length * ogg_info.channels);
samples_read = stb_vorbis_get_sample_offset(ogg);
if (samples_read == max_lenth)
playing = SCE_FALSE;