Re: [AD] Sound problem!

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Martin Du¹ek wrote :
> 
> If I used DIGI_AUTODETECT the music is not play correctly (I don´t
> hear the bass channell).

May be you do not reserve enough voices. Some MODS use more than 8
voices

> I use this:
> 
> bool sound_init()
> {
>  reserve_voices (16, -1);
>  if (install_sound(DIGI_AUTODETECT, MIDI_NONE, NULL)) {
>   allegro_message("Error initialising sound system\n%s\n",
> allegro_error);
>   return 1;
>  }
>  if (install_mod (8) < 0) {

Are you sure your MOD uses only 8 voices ?
Determine how many voices are needed to play your MOD (see below)

>   allegro_message("Error setting digi voices\n");
>   return 1;
>  }
>  set_mod_volume (128);
>  song = load_mod("snd/song.s3m");

Here song->no_chn contains the number of voices it needs to be played
correctly

>  if (!song) {
>   allegro_message("Error loading snd/song.s3m\n");
>   return 1;
>  }
>  is_sound = true;
>  return 0;
> }
> 

[snip]

	Bertrand.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/