From: Mark Phillips Newsgroups: comp.os.msdos.djgpp Subject: Re: audio samples for allegro Date: Tue, 29 Jun 1999 10:35:43 -0500 Organization: The University of Manitoba Lines: 22 Message-ID: References: <7l8nhi$jl1 AT dfw-ixnews6 DOT ix DOT netcom DOT com> <930642931 DOT 5410 AT www DOT remarq DOT com> NNTP-Posting-Host: silver.cs.umanitoba.ca Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: canopus.cc.umanitoba.ca 930670546 26682 130.179.24.6 (29 Jun 1999 15:35:46 GMT) X-Complaints-To: Postmaster AT cc DOT umanitoba DOT ca NNTP-Posting-Date: 29 Jun 1999 15:35:46 GMT In-Reply-To: <930642931.5410@www.remarq.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 Precedence: bulk > I don't know about the Allegro audio format but to convert > signed to unsigned is not difficult: add an offset to all > samples so that the most negative sample becomes 0. > > Example: > Signed input in [-128,+127], add 127 to each sample and you > will get unsigned samples in [0..255]. > Or you could just toggle the most significant bit: for(long i=0; i