0
0

hi,
i have some probs with the 3D sound.
I explain with my code ( my english is so bad ๐Ÿ˜ณ )
so :
in my init :

float pos[3] = { 0.0f, 0.0f, 0.0f }; // sound position
float vel[3] = { 0,0,0 }; // sound vel
float listenerpos[3] = { 50,0,0 }; // pos of listener

i load my sound :

m_Sample = FSOUND_Sample_Load(FSOUND_FREE, File, FSOUND_HW3D | FSOUND_LOOP_NORMAL, 0);

and i play it with :

FSOUND_Sample_SetMinMaxDistance(m_Sample, 1.0f, 1000.0f);
FSOUND_PlaySoundEx(m_Channel, m_Sample, NULL, FALSE);
FSOUND_3D_SetAttributes(m_Channel, Pos, Vel);
FSOUND_SetVolume(m_Channel, m_Volume);
FSOUND_SetPaused(m_Channel, FALSE);

in my main loop, i do :
FSOUND_3D_Listener_SetAttributes(listenerpos, vel, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f);

and in the end of the loop :
FSOUND_3D_Update(); (i think, it’s no use because i don’t update anything, but….i put it ๐Ÿ˜€ )

the var like m_*** is init (no pb with them)

So it’s dosen’t works, i don’t hear the song but when inputmode is FSOUND_2D, it’s works I don’t understand.. if someone can help a simple FMod french user ๐Ÿ˜†
thx all

  • You must to post comments
0
0

thx a lot for ure reply brett ๐Ÿ˜€

I use FSOUND_PlaySoundEx() for attribuate a specific volume.

brett wrote:
[quote:1nlev4o8]remember FSOUND_Sample_Load decompresses the whole file into memory, it sounds like you are trying to play music, which is probably very big, and you may end up allocating 10’s of megabytes of memory. You should use streams instead[/quote:1nlev4o8]

it’s just for 3D sound effect, not for a ambiance sound ๐Ÿ˜€

i will try FSOUND_FORCEMONO

bye ๐Ÿ˜ฎ

  • You must to post comments
0
0

hum ok ๐Ÿ˜€
u are right !!!! thx

If i use FSOUND_PlaySoundEx() or FSOUND_PLaySound() with FSOUND_FREE for channel, how i can get the number of the channel??
stupid question i suppose but i don’t kown ๐Ÿ˜ณ

  • You must to post comments
0
0

sorry ๐Ÿ˜ณ
if someone can clear the last message lol

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.