Skip to content

Commit

Permalink
Enable new vorbis decoder, implement OGG seeking.
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Piolat committed Nov 7, 2021
1 parent d53ee85 commit e3b644f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/audioformats/stream.d
Expand Up @@ -15,7 +15,7 @@ import dplug.core.vec;

import audioformats.io;

//version = newVorbis;
version = newVorbis;

version(decodeMP3) import audioformats.minimp3_ex;
version(decodeFLAC) import audioformats.drflac;
Expand Down Expand Up @@ -660,7 +660,12 @@ public: // This is also part of the public API
case ogg:
version(decodeOGG)
{
assert(false); // TODO: see #6
version(newVorbis)
{
return stb_vorbis_seek(_oggHandle, frame) == 1;
}
else
assert(false); // former decoder doesn't support it
}
else
assert(false);
Expand Down

0 comments on commit e3b644f

Please sign in to comment.