0
0

Hi Brett

I have problems with channels group

1) create the group:
FMOD_System_CreateChasnnelGroup(system, “Song Group”, &song_group);

2) set the master volume for this group
FMOD_ChannelGroup_SetVolume(song_group, 1.0f);

3) after loading the song (opening as stream) start play and set the channelgroup on song channel:
res = FMOD_System_PlaySound(snd_system,
FMOD_CHANNEL_FREE,
sng,
FALSE,
&chn);
if(res != FMOD_OK)
GetError(res);

FMOD_Channel_SetChannelGroup(chn, song_group);

in this example the song will not be play, if remarks the line FMOD_Channel_SetChannelGroup(chn, song_group); work correctly, why ?

Bye

  • You must to post comments
0
0

OK in this day, i send a email with ZIP with the examples code of my sound engine with code, see ya

  • You must to post comments
0
0

OK i have send the ZIP, have all, the 3 exe’s, 3 src of the exe’s and 3 src of all 3 DLLs, comapare this last

Bye

  • You must to post comments
0
0

always use FMOD_Software, this is line:

mode = FMOD_2D | FMOD_SOFTWARE | FMOD_ACCURATETIME;
mode |= (loop) ? (FMOD_LOOP_NORMAL) : (FMOD_LOOP_OFF);

FMOD_System_CreateSound(system, fname, mode, 0, &sng[num]);

  • You must to post comments
0
0

I have included essential part used of sound.dll into txt (src_sound.dll_example_X.txt), you could see the diference of calls, FMOD_CreateChannelGroup and FMOD_Channel_SetChannelGroup

hehe, yes i call FMOD_System_Close into sound_init, but this is called when call reset_sound() function (in the exe example), if not “first_init” else no, ok i send you a txt with the complete code of sound_init function.

  • You must to post comments
0
0

tried, equal result, the playback not advance :(

  • You must to post comments
0
0

OK i have sended the txt

is the code of sound.dll of example 1 and 2, in the example 3, not have the calls of FMOD_System_CreateChannelGroup

  • You must to post comments
0
0

My code is equal to example:

1) create the channelsgroup (no errors returned)
2) set volume of channelgroup (no errors returned)
3) load the song (with FMOD_SOFTWARE) with createsound/createstream (no errors returned)
4) play the song (no error returned)
5) set channelgroup at channel returned by playsound (no errors returned)

  • You must to post comments
0
0

OK i have found and fixed the bus, is on the sound_init, i call FMOD_System_CreateChannelGroup only at startup and when the program call reset_sound, call the FMOD_System_Close that invalid the pointers group, is my stupid error, sorry for your time :(

  • You must to post comments
0
0

if delete point 5 the song play correctly otherwise don’t play, the point 5 is call of FMOD_Channel(song->channel, song_group); song->channel is passed at FMOD_System_PlaySound/FMOD_System_PlayStream

  • You must to post comments
0
0

OK, i have founded the problem, is bug of FMOD Ex, if call the FMOD_System_CreateChannelGroup before the FMOD_System_CreateSound or FMOD_System_CreateStream, the playback not work, FMOD_System_CreateChannelGroup MUST BE called AFTER the CreateSound/Stream functions, otherwise PlaySound not work

Bye

  • You must to post comments
0
0

I have see this, in the example first calls createsound functions, after createchannelgroup

this is order of call of my engine:

FMOD_System_Init
FMOD_System_CreateChannelGroup
FMOD_System_CreateSound/FMOD_CreateStream
FMOD_System_PlaySound
FMOD_Channel_SetChannelgroup

result: don’t work

if change the order of call with:
FMOD_System_Init
FMOD_System_CreateSound/FMOD_CreateStream
FMOD_System_CreateChannelGroup
FMOD_System_PlaySound
FMOD_Channel_SetChannelGroup

result: work

I’am sure, i have tried this more times, try change the example, first create channel group after load sounds

Bye

  • You must to post comments
0
0

OK see this:

EXAMPLE 1:

[code:m9zulalb]
// init system
FMOD_System_Init(...........); (OK!)

// create channel group
FMOD_System_CreateChannelGroup(system, &song_group); (OK!)

// load song
mode = FMOD_2D | FMOD_SOFTWARE | FMOD_ACCURATETIME;
mode |= (loop) ? (FMOD_LOOP_NORMAL) : (FMOD_LOOP_OFF);

FMOD_System_CreateSound(system, fname, mode, 0, &sng[num]); (OK!)

// play song
FMOD_System_PlaySound(system,
FMOD_CHANNEL_FREE,
sng[num],
FALSE,
&chn[num]); (OK!)

// set channel group for song channel
FMOD_Channel_SetChannelGroup(&chn[num], song_group); (OK!)
[/code:m9zulalb]
RESULT 1: song don’t work

EXAMPLE 2:

[code:m9zulalb]
// init system
FMOD_System_Init(...........); (OK!)

// create channel group
FMOD_System_CreateChannelGroup(system, &song_group); (OK!)

// load song
mode = FMOD_2D | FMOD_SOFTWARE | FMOD_ACCURATETIME;
mode |= (loop) ? (FMOD_LOOP_NORMAL) : (FMOD_LOOP_OFF);

FMOD_System_CreateSound(system, fname, mode, 0, &sng[num]); (OK!)

// play song
FMOD_System_PlaySound(system,
FMOD_CHANNEL_FREE,
sng[num],
FALSE,
&chn[num]); (OK!)

// set channel group for song channel (line remarked)
// FMOD_Channel_SetChannelGroup(&chn[num], song_group); (OK!)
[/code:m9zulalb]
RESULT 2: song work

EXAMPLE 3:

[code:m9zulalb]
// init system
FMOD_System_Init(...........); (OK!)

// load song
mode = FMOD_2D | FMOD_SOFTWARE | FMOD_ACCURATETIME;
mode |= (loop) ? (FMOD_LOOP_NORMAL) : (FMOD_LOOP_OFF);

FMOD_System_CreateSound(system, fname, mode, 0, &sng[num]); (OK!)

// create channel group
FMOD_System_CreateChannelGroup(system, &song_group); (OK!)

// play song
FMOD_System_PlaySound(system,
FMOD_CHANNEL_FREE,
sng[num],
FALSE,
&chn[num]); (OK!)

// set channel group for song channel
FMOD_Channel_SetChannelGroup(&chn[num], song_group); (OK!)
[/code:m9zulalb]
RESULT 3: song work

  • You must to post comments
0
0

uhh? see the example 3, is equal to 1 , only change the line of createghannelgroup, and work

  • You must to post comments
0
0

I don’t have WARNING on compliation, sorry I have write bad the line on the forum, CHN is a array of FMOD_CHANNEL *, the real line is

FMOD_Channel_SetChannelGroup(chn[num], song_group);

and not work

  • You must to post comments
Showing 14 results
Your Answer

Please first to submit.