0
0

Hi !
when I use
[code:24whw1hs]FMOD_System_Init(fmodsystem, 32, 32, 0, hwnd)[/code:24whw1hs]
with hwnd pointing to an existing window, and then play a sound, this sound will be heard all the time this window (or another one of the same thread) will have the focus, and will be muted (but played), when it losts the focus.

OK so far, but I suspected that when I use
[code:24whw1hs]FMOD_System_Init(fmodsystem, 32, 32, 0, 0)[/code:24whw1hs]
that then the sound will be heard always, regardless of which window will have the focus, but it doesn’t. It will behave in the same manner than above, if the calling thread’s windows lost the focus, than the sound will be muted.

Can anybody confirm or explain this behaviour, or am I doing something wrong ?

(I tried with fmod ex alpha 16)

  • You must to post comments
0
0

[quote="Froggerprogger":2tlmih3l]Hi !
when I use
[code:2tlmih3l]FMOD_System_Init(fmodsystem, 32, 32, 0, hwnd)[/code:2tlmih3l]
with hwnd pointing to an existing window, and then play a sound, this sound will be heard all the time this window (or another one of the same thread) will have the focus, and will be muted (but played), when it losts the focus.

OK so far, but I suspected that when I use
[code:2tlmih3l]FMOD_System_Init(fmodsystem, 32, 32, 0, 0)[/code:2tlmih3l]
that then the sound will be heard always, regardless of which window will have the focus, but it doesn’t. It will behave in the same manner than above, if the calling thread’s windows lost the focus, than the sound will be muted.

Can anybody confirm or explain this behaviour, or am I doing something wrong ?

(I tried with fmod ex alpha 16)[/quote:2tlmih3l]Try passing in the desktop window instead of 0.

  • You must to post comments
0
0

Couldn’t you use the INIT_GLOBAL flag (don’t know out of my head how it’s called exactly) in the same way as you had to do with fmod 3?

  • You must to post comments
0
0

Hi and thanx for your answers!
I tried now
[code:1n31337x]
FMOD_System_Init(fmodsystem, 32, 32, 0, GetDesktopWindow_())
[/code:1n31337x]
and
[code:1n31337x]
FMOD_System_Init(fmodsystem, 32, 32, FMOD_INIT_DSOUND_GLOBALFOCUS , GetDesktopWindow_())
[/code:1n31337x]
but both don’t even let the sound ever be heard, though it is played.

Further I tried:
[code:1n31337x]
FMOD_System_Init(fmodsystem, 32, 32, FMOD_INIT_DSOUND_GLOBALFOCUS, hwnd)
[/code:1n31337x]
but it results in the same behaviour as in my first topic: the sound is muted when the focus is lost.

My soundcard doesn’t have hardwarechannel, might this be a reason (though I suppose not) ?

  • You must to post comments
0
0

[quote:3zvnhfct]i think i’ll remove the globalfocus flag and just make the audio global by default unless you specify a hwnd, it makes more sense. [/quote:3zvnhfct]
I would appreciate that !

[quote:3zvnhfct]You should have used the global focus flag and null for the hwnd.[/quote:3zvnhfct]

Whooops, I used the wrong value for this constant (haven’t ported them to PB ’til now.)

I thought DSOUND_GLOBALFOCUS would have the value 4, but it has 0x1000
😳
OK, using DSOUND_GLOBALFOCUS works fine, even if I overgive a window-handle and not 0 for hwnd.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.