I have to use tremor to decode ogg vorbis in my project due to much simplier integration (to use on ESP-32). Its docks says:
It returns up to the specified number of bytes of decoded audio in host-endian, signed 16 bit PCM format. If the audio is multichannel, the channels are interleaved in the output buffer.
…
Signature: long ov_read(OggVorbis_File *vf, char *buffer, int length, int *bitstream);
Now I'm confused about how to read 16-bit signed samples from char array. Do I have to follow some advices from here Convert 2 char into 1 int or do some other thing?
Iterate the buffer two elements at a time. Since the data is in little-endian form ( according to documentation ) you can directly represent two characters as a signed 16 bit integer, in this case 'short'