www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/17/02:00:35

From: "Al Morgan" <muaddib AT proaxis DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Sound with allegro
Date: Mon, 16 Aug 1999 19:53:19 -0700
Organization: Posted via Supernews, http://www.supernews.com
Lines: 86
Message-ID: <rrhjirb6oqs34@corp.supernews.com>
References: <3 DOT 0 DOT 32 DOT 19990815235810 DOT 007b5580 AT mail DOT colba DOT net>
X-Complaints-To: newsabuse AT supernews DOT com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thanks for your help.  The timer was the problem, now it works just fine.

Thanks again,
    Al [muaddib AT proaxis DOT com]


<varobert AT colba DOT net> wrote in message
news:3 DOT 0 DOT 32 DOT 19990815235810 DOT 007b5580 AT mail DOT colba DOT net...
> At 04:58 PM 8/15/99 -0700, you wrote:
> >I'm trying to get sound to work under Allegro.  I know I have digi_driver
> >set correctly, how do I know midi_driver.  (sorry, stupid question).
I've
> >checked and doublechecked, and the problem isn't the .wav file being
there.
> >It compiles fine (gxx -o sound.exe sound.cpp -lalleg), but no sound comes
> >out when I run it.
> >
> >Thanks in advance,
> >    Al [muaddib AT proaxis DOT com]
> >
> >#include <allegro.h>
> >
> >void main()
> >    {
> >    allegro_init();
>
> You have to install the timer. Use install_timer() for that. It is
required
> for playing sound.
>
> >    detect_digi_driver(DIGI_SB16);
> >    detect_midi_driver(MIDI_AWE32);  // i guessed that, beacuse it sounds
>
> You don't need to detect them if you don't bother to check the return
values.
>
> >familiar, how do i know what to put here?
> >    install_sound(DIGI_SB16, MIDI_AWE32, "");
>
> Are you sure AEW32 is right ? try MIDI_AUTODETECT and see.
> You might also want to replace the "" with NULL.
> >
> >    SAMPLE *amazing = load_wav("c:\\amazing.wav");
> >
> >    play_sample(amazing, 255, 128, 1000, 0);
>
> Add some delay here.
> The sample will start playing, but you need to do something while it
plays,
> or it will immediately stop !
>
> >
> >    allegro_exit();
>
> This line is unneded. allegro_init() sets this up for you.
>
> >    }
> >
> >I have sound.cfg in the same directory configured as follows:
> >
> >digi_card = SB16
> >midi_card = AWE32
> >digi_voices = 1
> >midi_voices = 1
>
> You may want to use more than 1 voice (try -1 for auto)
>
> >quality = 1
> >flip_pan = 1
> >sb_port = 220
> >sb_dma = 1
> >sb_irq = 5
> >sb_freq = 30000
> >fm_port = 388
> >mpu_port = 330
> >mpu_irq = 5
> >digi_volume = 128
> >midi_volume = 128
> >
> >
>
>
> - GodOfWar
> There is always one more bug.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019