0
0

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:

[code:2rm5a8g0]FMOD_RESULT F_CALLBACK
macsetposition(FMOD_CODEC *codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype)
{
printf("mac setpos %d %d %d\n", subsound, position, postype); fflush(stdout);
...[/code:2rm5a8g0]

that always prints “0 0 1”, even if the call that triggered it was:

[code:2rm5a8g0]channel.setPosition(15000, FMOD.TIMEUNIT.MS);[/code:2rm5a8g0]

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.
&macread, // Read callback.
0, // Getlength callback.
&macsetposition, // Setposition callback.
0, // Getposition callback.
0, // Sound create callback (don’t need it)
};[/code:2rm5a8g0]

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.

  • You must to post comments
0
0

I see. Well, you’re right about 3.97 being slower than 3.99 when it comes to decoding/seeking, some guy at HA just confirmed it.

  • You must to post comments
0
0

other way around.. 399 seek is bad. 397 is fast.

  • You must to post comments
0
0

Oops, that was what I meant, yes. :)

  • You must to post comments
0
0

looks like you need a getPosition callback 😉 Otherwise FMOD will assume your stream has 0 length. I assume you use LOOPing otherwise it wouldn’t work.

best regards
Matthias

  • You must to post comments
0
0

any luck with this brett?

  • You must to post comments
0
0

name[0] = 0
channels = 2
format pcm16
freq = 44100
blockalign = 4
lengthpcm = long number, but definatly not overflowed

http://www.ishiboo.com/~nirva/mac.cpp

thats the plugin src

  • You must to post comments
0
0

ill try it out.. what is special about ‘internal’ plugins? i was under the belief that the built in ones were just like the external ones, just pkged up

  • You must to post comments
0
0

any ideas brett? im at a loss here.. seeking is just not working for me. if you want, i can put up an example ape and monkeys audio dll + lib so you can link the example to test stuff out.

  • You must to post comments
0
0

it works if i use PCM.. thanks brett!

will this fix be in .32?

  • You must to post comments
0
0

http://www.ishiboo.com/~nirva/fmod/

there is a file in there called DESCRIPTIONS.txt that explains what everything is. let me know if you need anything

  • You must to post comments
0
0

How the heck did you get the MACLib to be 972 KB (~1 MB)? That size is scary. 😡

  • You must to post comments
0
0

This is perhaps a debug version ?

  • You must to post comments
0
0

Hmm, yep, seems to be a debug version. But why compile it as a debug version anyway? The error relies in his code, not in the actual MAC core since I got seeking working in my BASS add-on (without any changing in the MAC core).

Edit: Typo.

  • You must to post comments
0
0

because i was compiling everything debug for my project… this is only a small part of it

i just gave you what i had

note also that it is mac397, and not 399 — 399 seek times are horrific

  • You must to post comments
Showing 14 results
Your Answer

Please first to submit.