delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/02/10:49:00

Message-ID: <F77915E7F086D31197F4009027CC81C91147A8@probe-2.as-london.acclaim.com>
From: Shawn Hargreaves <SHargreaves AT acclaimstudios DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Sound stream corruption with Allegro?
Date: Thu, 2 Dec 1999 15:14:41 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

Luca Bisti writes:
> I have the following problem with the Allegro audio stream routines: 
> for some reason that I haven't been able to find out myself, the 
> sound samples generated by my program are somewhat distorted by the 
> Allegro play routines, that is the music which comes out of the 
> soundcard is a bit "scratchy".

This is hard to answer without being able to hear exactly what sort
of distortion you are talking about: I know it is hard to describe
such things in words, but without that info I can only guess about
what sort of trouble this might be.

To start with, is this problem specific to when using audiostreams,
or does it also happen when playing regular sample voices using
Allegro? ie. is it related to how you are filling the stream buffer,
or to the sound player in general?

What is your stream buffer size? Try making it bigger...

What sample mixing quality are you using? (set in allegro.cfg, or
with the setup program). If less than 2, try increasing it.

> my samples have amplitude 64 (just to make sure that clipping cannot 
> occur).

There is no point in doing that: by playing them at lower than maximum
volume, you are just reducing the precision of the output, so you
effectively have only a quarter the full number of bits that the
hardware can provide.

> My soundcard is a Creative SB 32.

What Allegro driver are you using? Since those cards aren't truly SB
compatible, you are probably going through some sort of SB emulation
layer provided by Creative, and it is possible that this may be
reducing everything down to 8 bit, or a lower sample rate (assuming
that Allegro can only access the card as an SB Pro clone, which is
common for that kind of emulation).

btw. you might want to set your mail client so that it will wrap
lines at a sensible width like 70 columns: at the moment it is
sending everything as one huge line, which is almost impossible
to read from many mail clients...


	Shawn Hargreaves.

- Raw text -


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