devkitPro / 3ds-examples

Examples for 3DS using devkitARM, libctru, citro3d and citro2d
https://devkitpro.org/viewforum.php?f=39
453 stars 51 forks source link

Add Ogg Vorbis decoding example #61

Closed LiquidFenrir closed 7 months ago

LiquidFenrir commented 7 months ago

Adapted from the high-quality example for Opus decoding.
Tested working on n3ds without speedup or cache enabled, thus should work flawlessly on o3ds.

Adjustments made: the sample rate and channel count is not fixed, so the constants had to be scrapped. A reuse of the nsamples member of ndspWavebufs is in place instead, good for a single playback (as the last chunk of the ogg file may have a sample count lower than the wanted value, but they don't get reused after that).