I am nearly complete with a monkey’s audio fmod ex codec plugin.
the only thing i lack is seek support.. for some reason, my seek handler gets called back with 0 position always:
macsetposition(FMOD_CODEC *codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype)
printf("mac setpos %d %d %d\n", subsound, position, postype); fflush(stdout);
that always prints “0 0 1”, even if the call that triggered it was:
I’m going to guess that the other plugins such as flac were written using the same plugin mechanism, so this has to work.. please tell me what I’m doing wrong.
this is my codec description:
[code:2rm5a8g0]FMOD_CODEC_DESCRIPTION rawcodec =
"Monkey’s Audio player plugin", // Name.
0x00010000, // Version
0, // defaultasstream
FMOD_TIMEUNIT_MS, // The time format we would like to accept into setposition/getposition.
&macopen, // Open callback.
&macclose, // Close callback.
¯ead, // Read callback.
0, // Getlength callback.
&macsetposition, // Setposition callback.
0, // Getposition callback.
0, // Sound create callback (don’t need it)
and in my open callback, i setup the FMOD_CODEC passed in w/ a waveformat, numsubsounds = 0, and userdata to my internal object that holds my monkeys audio state. i return FMOD_OK from it.
my lengthpcm is setup properly as well in the waveformat (along with channels, format, frequency, and blockalign).
i will happily release the source for the plugin to fmod maintainers (if they want it).. just need some help here.
- nirva asked 11 years ago
Please login first to submit.