Thanks BitRake :D
Posted on 2002-11-25 20:29:21 by x86asm
I had initially assumed the samples were signed in my first post.

lodsb
sub al, 128
mov ah, al

There is a lot of good MMX code about for this kind of thing - really haven't ever done anything with audio, but I've seen it. :) Check out the attached proggie - it's a cool effect by Andy J Turner. Check out the ABox2 Demo coded in MASM!
Posted on 2002-11-25 21:46:11 by bitRAKE
bitRAKE: :eek:

abox2 is masterpiece in ASM. love it. thanks.
back to listen to jambots :alright:
Posted on 2002-11-26 01:36:20 by TBD
Hi x86asm, you wrote:
One last question Maverick before you vanish off :D, how would you do that conversion if the 8-bit sample was signed?
I went to sleep :P


MOVSX EAX,BYTE PTR [ESI]
MOV [EDI],AX

About resampling.. the method you're using now is not really hi-fi.. but you should use only what pleases you most. :alright:

Posted on 2002-11-26 03:06:52 by Maverick
WOW!! Nice proggies, I'll certainly look at this, but I have a 700pg book to read for English class :(
Posted on 2002-11-26 07:05:32 by x86asm

I had initially assumed the samples were signed in my first post.

lodsb
sub al, 128
mov ah, al

There is a lot of good MMX code about for this kind of thing - really haven't ever done anything with audio, but I've seen it. :) Check out the attached proggie - it's a cool effect by Andy J Turner. Check out the ABox2 Demo coded in MASM!



I assumed the same thing, thanks very much everyone for your help :D
Posted on 2002-11-26 07:06:44 by x86asm
i think you know Fairlight MOD player tutorial . it is old (1995) but gives some information about playing MOD files.
also there is a S3M version but i didnt find on a quick look.

and of course Chris Dragan XM player with DirectSound support

hope you can find some informations there.
Posted on 2002-11-26 07:30:45 by TBD

i think you know Fairlight MOD player tutorial . it is old (1995) but gives some information about playing MOD files.
also there is a S3M version but i didnt find on a quick look.

and of course Chris Dragan XM player with DirectSound support

hope you can find some informations there.


I got both in my document library :D
Posted on 2002-11-26 14:58:26 by x86asm
You know what? I'm going to assume the following...

1. All 8-bit WAV's have unsigned sample data
2. The MOD/S3M files have unsigned samples (unless there is a flag that states whether the samples are signed, like the IT module for example.)
Posted on 2002-11-26 15:08:26 by x86asm
I'm wrong, the samples in the MOD are signed, I read in a doc that the samples are stored as two complements.
Posted on 2002-11-28 14:24:10 by x86asm
Use 8bit value as hi-part of 16bit value.

In C language:

short var16 = ((short)var8) << 8;

In ASM:

mov al,
shl ax,8
mov ,ax

or if u know al value is zero:

mov ah,
mov ,ax


For any questions u can use else e-mail address.
Posted on 2002-12-09 20:49:52 by siriokds