I’ve been trying to implement 3D sound in my game. Everything works as expected when using FSOUND_PlaySound3DAttrib. However, if I use FSOUND_PlaySound and FSOUND_3D_SetAttributes, I hear the sound at the listener position for a fraction of a second. I’ve tried pausing the channel. I’ve tried setting the attributes before and after the playsound call. I’ve tried calling an extra FSOUND_3D_Update, but nothing has made any difference. How can this be?
Oh, I forgot to mention that I’m using Windows 2000 — as a side note, I’d like to say that I had to fix both the minimum and the maximum number of hardware channels to 16 to avoid dropped sounds, I guess that’s a SB Live driver related issue?
<font size=-1>[ This Message was edited by: Arngrim on 2001-08-23 11:56 ]</font>
Mmmh… then just why do my docs for PlaySound3DAttrib read:
THIS FUNCTION IS OBSOLETE AND IS REMOVED FROM THE API
Speaking of the docs, I’ve found this in FMUSIC_SetMasterVolume:
volume value from 0-256. 0 = silence, 256 = full volume.
Isn’t this supposed to be 0-255?
Anyway, the new FMOD 3.4 way of handling the attribute thing looks good to me!
Thanks for you answer and keep up the good work!
lol, now this is what I call coincidence — only about an hour ago I changed from FSOUND_PlaySound3DAttrib to FSOUND_PlaySound and FSOUND_3D_SettAttributes.
My source looks like this:
fPos = Position.m_fX;
fPos = Position.m_fY;
fPos = Position.m_fZ;
int nChannel = FSOUND_PlaySound(FSOUND_FREE, pSample);
FSOUND_3D_SetAttributes(nChannel, fPos, NULL);
I experience the same problem as Kippesoep, the sound is played at the listeners position for the fraction of a second and is then transfered to the correct position.
I’ll drop back to the PlaySound_3D version until we know what causes this … and yes, I’m using FMOD 3.33, unless the file_id.diz file is lying to me 😉
I’m using a SB Live, btw.
Please login first to submit.