Mail Archives: djgpp/1999/07/17/02:02:41
At 12:21 PM 7/16/99 -0400, you wrote:
>Im confused with using sound in my program here is the source that i wrote:
> BITMAP *allegro;
^^^^^^^^ Is that allowed ?
> // Load Bitmap Into Memory
> allegro = load_bitmap(PIC1, pal);
> set_palette(pal);
>
> //Display Bitmap
> blit(allegro, screen, 0, 0, 0, 0, WIDTH, HEIGHT);
Looks OK to me.
>
> readkey();
> load_sample( SND1 );
> play_sample(SND1 *, 255, 128, 1000, 0);
> stop_sample(SND1 *);
That;s your prblem; the code should look like this:
SAMPLE *mysample = load_sample(SND1);
play_sampe(mysample, 255, 128, 1000, 0);
//Do something so sample can finish playing
stop_sample(mysample);
> fade_out(3);
> destroy_bitmap(allegro);
>
> return 0;
>}
>
>
>can someone please tell me what is wrong? i want to get the sound to play at
>the end of the program after a key is pressed. everything else works great
>
>
>
>
- Raw text -