0
0

I wondered if you had the time to look at the problem I’ve had with reading tags…

I’ve sent you an example of code where the problem could be seen…

Thanks !

  • You must to post comments
0
0

[quote:aref355r]Can you make a reproducable case of this? (ie using one of the fmod examples maybe). I can’t reproduce it and i’m really busy at the moment so i cant just keep trying different things that don’t reproduce any problems.

ok while testing something else I happened upon some stream weirdness. I’ve cleaned up some of the buffering / seeking logic now in the new release v30, it might have something to do with your issue.

[/quote:aref355r]

Just got finished testing. It appears the issue with new streams not starting is fixed, but we still sometimes get a stream that starts to play and stops early. I’ll see if I can make a reproducable sample, but so far I’ve only consistently seen it in the game and some of our tools.

It is definitely only on 3D hardware sounds. The same WAV files played as either software or 2D hardware play fine. Unfortunately I do need to use hardware so I can get EAX support.

  • You must to post comments
0
0

We did some more testing and it seems to only happen on Creative Labs Live! 5.1 cards. Audigy and AC97s seem to work fine now with this version.

The driver is dated 10/15/2003, and has a version number of 5.12.2.296 which seems to be newer than the one on Creative’s website? This version was on the CD.

  • You must to post comments
0
0

i believe i have found a bug in this newest version that didnt exist in 28

im playing a mp3 to end (175 seconds). i get a end callback like i should.

then i play a diff mp3, and altho it starts playing from the start, the position returned starts at 175 seconds, not 0.

if, in the end callback, i call stop(), all these problems seem to go away. is that cool for me to do? i didnt need to do this in v28

  • You must to post comments
0
0

works well, thanks!

  • You must to post comments
0
0

[quote:3a89063m]Thanks I found a problem that stream channels weren’t resetting their position to 0 for display. I think this would also make new streams end prematurely that didn’t loop.

that sounds like vor’s problem! (though i have no idea why it would be soundcard specific because it is all fmod code).
[/quote:3a89063m]

Just tried it and it still does it on the Sound Blaster Live! 5.1 card. I also tried the older FMOD 3.74 and it does NOT do it.

  • You must to post comments
0
0

I threw in the following to check it:

[code:2q0m85xq] {
FMOD_RESULT res;
unsigned int pos = 0;

res=FMOD_Channel_GetPosition(sdata->channel,&pos,FMOD_TIMEUNIT_MS);
_ASSERT(res == FMOD_OK);
_ASSERT(pos == 0);
res=FMOD_Channel_GetPosition(sdata->channel,&pos,FMOD_TIMEUNIT_PCMBYTES);
_ASSERT(res == FMOD_OK);
_ASSERT(pos == 0);

}
[/code:2q0m85xq]

Asserts didn’t fire (well, FMOD_TIMEUNIT_RAWBYTES returned unimplemented 😕 )

My best guess now is I’m getting an end callback early and stopping the stream on this card/driver? In the end callback I set a flag which I check after FMOD_System_Update() and stop any marked streams.

  • You must to post comments
0
0

I added the check after the stream was created and assigned a channel, but still paused to make sure the start position was 0 as you asked above.

When I get an end callback I destroy the stream tracking, which makes sure the stream is stopped since it is the same routine I use to terminate a stream by force:

[code:20fdlu70]
typedef struct {
FMOD_SOUND *stream;
FMOD_CHANNEL *channel;
unsigned int streamlength;
float maxdist;
int isKilled;
int autokill;
int is3D;
int isVirtual;
V3DVECTOR3 pos;
} SOUNDDATA;

static FMOD_RESULT F_CALLBACK _streamEnd(FMOD_CHANNEL *channel,FMOD_CHANNEL_CALLBACKTYPE type,
int command,DWORD commanddata1,DWORD commanddata2)
{
SOUNDDATA *sdata = NULL;

FMOD_Channel_GetUserData(channel,(void **)&sdata);
if (sdata) sdata->isKilled = TRUE;
return FMOD_OK;
}

static void Sound_Destroy_(SOUNDDATA *sdata)
{
if (sdata->channel) FMOD_Channel_Stop(sdata->channel);
if (sdata->stream) FMOD_Sound_Release(sdata->stream);
vfree(sdata);
}

void Sound_Destroy(SOUNDDATA *sdata)
{
if (!_system) return;
if (sdata==NULL) return;
Sound_Destroy_(sdata);
VM_List_DeleteData(sounds,sdata);
}

void Sound_Cleanup(V3DVECTOR3d *lloc,V3DVECTOR3 *veloc,V3DVECTOR3 *vdir,V3DVECTOR3 *vup)
{
V3DVECTOR3 floc,fvel,fforward,fup;
SOUNDDATA *sdata;
VMLIST *tokill;

// update listener position/orientation
if (lloc && veloc && vdir && vup) {
v3dsetvec3(floc,(lloc)[0]0.01,(lloc)[2]0.01,(lloc)[1]0.01);
v3dsetvec3(fvel,(veloc)[0]0.01f,(veloc)[2]0.01f,(veloc)[1]0.01f);
v3dsetvec3(fforward,(vdir)[0],(vdir)[2],(vdir)[1]);
v3dsetvec3(fup,(
vup)[0],(vup)[2],(vup)[1]);
FMOD_System_Set3DListenerAttributes(_system,0,(FMOD_VECTOR *)&floc,(FMOD_VECTOR *)&fvel,
(FMOD_VECTOR *)&fforward,(FMOD_VECTOR *)&fup);
}

// triggers callbacks
FMOD_System_Update(_system);

// make a list of stopped autokill sounds
tokill = VM_List_Create();
VM_List_First(sounds);
while (VM_List_Next(sounds,NULL,&sdata)) {
if (!sdata->autokill) continue;
if (!sdata->isKilled) continue;
VM_List_AddLast(tokill,NULL,0,sdata);
}

// destroy the terminated sounds
VM_List_First(tokill);
while (VM_List_Next(tokill,NULL,&sdata)) {
Sound_Destroy(sdata);
}
VM_List_Destroy(tokill);
}
[/code:20fdlu70]

Sound_Cleanup() is called once per frame.

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.