0
0

Hi brett

Is possible paused the entire Sound System without call plus of 1 function ?

for example, you have a game that play sounds and musics and at runtime choose of switching your game from windowed to fullscreen (if game support this) or fullscreen to windowed, in some cases during the switching the sound could enter in a “sound loop” (the sound is blocking into a point for a certain time until the switching of directdraw or direct3D, etc… is complete).

Is possible using of 1 function (actual o new) for this ?

EXTRA NOTE: have found a small error on the DOC on System::update function into remarks:

“If FMOD_OUTPUTTYPE_NOSOUND_NRT or FMOD_OUTPUTTYPE_NOSOUND_NRT output modes are used, this function also drives the software / DSP engine, instead of it running asynchronously in a thread as is the default behaviour.”

repeat 2 time FMOD_OUTPUTTYPE_NOSOUND_NRT :)

bye

  • You must to post comments
0
0

Hi

i have tried this, but not run, the code is

FMOD_CHANNELGROUP *chnMaster;

int PauseSystem(BOOL pause) {
res = FMOD_System_GetMasterChannelGroup(snd_system, &chnMaster);
if(res == FMOD_OK) {
res = FMOD_ChannelGroup_OverridePaused(chnMaster,
(pause) ? (TRUE) : (FALSE));
}
}

have tried the other way:

int PauseSoundSystem(BOOL pause) {
res = FMOD_System_GetMasterChannelGroup(snd_system, &chnMaster);
if(res == FMOD_OK) {
res = FMOD_ChannelGroup_OverridePaused(chnMaster,
(pause) ? (TRUE) : (FALSE));
res = FMOD_System_Update(snd_system);
}
}

All res returns FMOD_OK, but the sounds is not paused during the switching fullscreen/windowed or reverse, i call PauseSoundSystem before the call of directdraw with TRUE and at final with FALSE

  • You must to post comments
0
0

No, not accidently unpaused, don’t work (on my engine) you can create an example that demostrate the use of this system on the next release ?

  • You must to post comments
0
0

Brett

Have tried stuff, my engine use some ChannelGroup (like a channel for music, for sound effect, etc…) using the following code:

FMOD_ChannelGroupOverridePaused(music_group, pause);
FMOD_ChannelGroupOverridePaused(sound_group, pause);

this works at fine, but if use the previous code of the post (retrieving masterchannel and use this with the function) don’t work, is possible a conflict with the internal channel group and channels group created from the user

  • You must to post comments
0
0

ahhh OK, have modified this, works now :)

  • You must to post comments
0
0

Yes, if you could is good idea :)

have added the possibility of reseting completly the audio (bits, rate, etc..) on my engine:

1) on start the engine create all groups possibles (sound, cd, music, etc…) retrieves the master_group and add all child (sound, cd, etc…), at final call simply FMOD_ChannelGroup_SetPaused

2) when used reseting, call all FMOD_ChannelGroup_Release and re-execute the point 1

with your idea, on the point 1 is sufficient create all groups required, retrieves master_group and call SetPaused when required

  • You must to post comments
0
0

Other possibility if you want is create new function that allow the user to choise if tha adding is manual or automatic, for example

after system::init and before any call of creategruop if possible using a function type
FMOD_System_AutoAttachMasterChannelGroup(FMOD_BOOL auto_attach)
if parameter is TRUE when creating a ChannelGroup is automatically attached on master_group, is FALSE, you have to adding this manually, the value of autoattach is modificable with the function on every moment after system::init, when call system::release the value return to default

for default you could:

1) change behaviour to automatically (at default) and creating FMOD_SystemSetAttachMasterChannelGroup for change it
2) using the current system (manual) and creating FMOD_AutoAttachMasterChannelGroup for change it

this is my advice, could change the names if have better, see you :)

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.