delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/08/10:49:04

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro Sound Control
Date: Sun, 8 Jun 1997 14:45:28 +0100
Organization: None
Distribution: world
Message-ID: <K+1h7eA4drmzEwXr@talula.demon.co.uk>
References: <01bc7209$fdb98fc0$ef0874cf AT default>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 45
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Larry Patton writes:
>I am using Allegro v2.2, and I would like to put tracking capabilities into
>it, such as S3M, IT, or XM.  I would like to make my own Tracker, using

This is actually already being worked on! Matthew Bowie has written a
mod player that runs on top of the existing Allegro sound drivers, using
the voice_*() functions (which were added since v2.2). He has written
one player for standard .mod files, which seems to work very well
although I need to do some work on the SB driver to get around a problem
with DMA buffer latency that causes some nasty timing errors, and
another for DigiTrakker .mdl files which is unfinished and still has a
few problems. Unfortunately Matthew has recently gone off to join the
Navy, so he isn't going to be able to work on it for a while. Vincent
Poulain is currently looking at the code: if you are interested in
helping out with it, write to vpoulain AT club-internet DOT fr and see how he's
getting on (in the meantime I'm planning to integrate the working .mod
player into Allegro, and leave support for other formats until someone
is able to get it working in a more reliable manner).

>this library.  However, when I tried to modify the SAMPLE file format, such
>as when loading a file.  I would set all the data, allocate enough memory
>with malloc, and set the data pointer to the memory I had just allocated. 
>All that worked OK, but when I went to play that sample, my computer froze.

Did you remember to lock the memory? If you've done that, and filled in
the sample length and frequency correctly, it ought to work...

> I would like to scrap that Idea, and just use Allegro to create a buffer
>that I could just write too, and it would continously use that buffer.  I

Well, you could just set a sample playing in looped mode and modify its
contents on the fly, but that won't work with wavetable drivers that
transfer the entire sample into the soundcard before playing it (there
are no such drivers at present, but Tero is busy working on GUS
support). Alternatively you could hack the lowerlevel mixing code in
Allegro (the _mix_some_samples() routine, which used to live in sound.c
but in my WIP version has now moved to mixer.c). That is called by the
SB driver once per DMA transfer, to generate the next buffer full of
samples, but again any changes that you make here aren't going to work
with the GUS driver...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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