@ptitSeb you do so much porting this is probably all stuff you already know, but I try to help if I can, when I look at our in-house code base, the changes we have when using tremor are in two places:
1. Some extra parameters to ov_read (you can see the values we pass below):
long result = ov_read( &m_PiOggVorbisFile.OggVorbiFile, pByteBufferPtr + amountReadInBytes, numberOfBytesToRead - amountReadInBytes,
#if !defined(_OGG_VORBIS_TREMOR)
0, 2, 1,
#endif
§ion
);
2. Time in milliseconds vs seconds
bool OggAudioReader::GetLength( OggVorbis_File * file, PiTimeUnit & timeUnit, int desiredLogicalBitstream /* = -1 */ )
{
#if defined(_OGG_VORBIS_TREMOR)
ogg_int64_t timeInMilliseconds = ov_time_total( file, -1 );
if ( timeInMilliseconds == OV_EINVAL )
return false;
else
timeUnit = PiTimeUnit::FromMilliSeconds( timeInMilliseconds );
#else
float timeInSeconds = ( float )ov_time_total( file, -1 );
if ( timeInSeconds == OV_EINVAL )
return false;
else
timeUnit = PiTimeUnit::FromSeconds( timeInSeconds );
#endif
return true;
}
Of the two things, the first was obvious (compile error) but the second compiled fine, but results in a problem (maybe no audio) and took longer to track down.