www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/11/08:18:43

From: aho450s AT nic DOT smsu DOT edu (Tony O'Bryan)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: SB LIB for DJGPP
Date: Thu, 09 Jan 1997 22:31:11 GMT
Organization: Southwest Missouri State University
Lines: 22
Message-ID: <32d548d2.3455319@ursa.smsu.edu>
References: <32d49194 DOT 12794491 AT ursa DOT smsu DOT edu>
NNTP-Posting-Host: forseti.i60.smsu.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, 09 Jan 1997 13:41:31 GMT, aho450s AT nic DOT smsu DOT edu (Tony O'Bryan) wrote:

>Does anyone have any experience with getting Allegro and SB_LIB to work
>together.  I was using MIDI files for my music, but MOD files are much better.
>I would really like to replace the lame MIDI stuff with the more
>powerful-sounding MOD system.

After wading through seven long C++ source files and commenting out everything
that wasn't directly related to the MOD player, I discovered why my program kept
crashing with a segmentation error.  Part of the bad code went like this:

if (pointer == NULL)            //This should have been a    !=    comparison
  free(pointer);
pointer = malloc(size);         //A misnamed parameter made this size zero
memcpy(pointer,data);        //Writing to a non-existent buffer (DUH!)

With this corrected, the MOD library works like a champ in my game.  Someone had
asked a while ago for a good MOD playing library for DJGPP, so I want to highly
recomment this one.  It was written by Joel H. Hunter and can be found at:

ftp://x2ftp.oulu.fi/pub/msdos/programming/djgpp2/sb05_dj2.zip

- Raw text -


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