delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/05/02:40:28

From: Luca Bisti <s150405 AT studenti DOT ing DOT unipi DOT it>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Sound stream corruption with Allegro?
Date: Fri, 3 Dec 1999 00:51:23 +0000
Organization: Universita' di Pisa
Lines: 72
Message-ID: <Pine.BSF.4.10.9912030024470.66547-100000@studenti.ing.unipi.it>
References: <F77915E7F086D31197F4009027CC81C91147A8 AT probe-2 DOT as-london DOT acclaim DOT com>
NNTP-Posting-Host: studenti.ing.unipi.it
Mime-Version: 1.0
In-Reply-To: <F77915E7F086D31197F4009027CC81C91147A8@probe-2.as-london.acclaim.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Hi and thanks for replying!

> 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.

You are perfectly right :-) Anyway, the problem can be easily reproduced
if I let you have a small fragment of a WAV file where the "corruption"
sounds pretty evident. The WAV plays the way I mean "correctly" with
WinAMP, Cooledit and any other player, while it doesn't with EXSAMPLE.EXE
and my program itself. I can send you a few KB WAV by mail or tell you an
URL where you can get it and check yourself.
 
> What is your stream buffer size? Try making it bigger...

It's currently 2K and I have tried with 4K and 8K, same thing. I don't
think it's anything related with end-of-buffer and DMA refills problems.
 
> What sample mixing quality are you using? (set in allegro.cfg, or
> with the setup program). If less than 2, try increasing it.

I believe that _sound_hq is 1, the default setting. I have tried with 0
but not with 2. As I said, I'd prefer to avoid *any* processing by Allegro
over my sample buffer. Probably, the interpolation/resampling/etc code of
Allegro works great in most situations, but sometimes doesn't produce the
desired improvements.

> 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.

Yes I know, but it's a square wave produced by an emulator, so it
shouldn't make a big difference. It's 64 because I have 3 other channels
to mix, so I get the full dynamic range when all the channels are playing
(I mix the 4 channels myself) :-) Anyway, for these tests only one
channel plays. It still does not explain why other WAV players produce
better sound on the same WAV.
 
> > 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).

My SB32 (ISA PnP) *is* 100% SB compatible, because it has a genuine DSP
v4.13 and *every* DOS program works perfectly with it, no legacy
emulation drivers and such pain; maybe you was referring to SB PCI64 and
PCI128 (which are Ensoniq ES1370/1 chipsets). I have been
programming intensively with it (at I/O level) and never found an
incompatibility. Allegro detects it correctly
as a SB16. Today I forced the use of the SBPro and SB driver, but nothing
happened (same result).

> 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...

Sorry, I know :-( Unfortunately I have to post from a different account,
because my ISP's newsserver sucks really. Dos -> Unix CRLF conversions do
the rest...  :-) I'm writing this message via telnet, so you should get it
right now!

Thanks once again for your patience,

Luca.

- Raw text -


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