LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Playing old WAV files with PCMSTREAM

Root / General / [.]

12Me21Created:
PCMSTREAM plays WAV files with 16 bit signed samples, but the microphone and both WAV players use 8 bit unsigned samples. here's a command to convert 8 bit -> 16 bit signed: ARYOP #AOPMAD,NEWWAV%,OLDWAV%,256,-32768 it multiplies each sample by 256 and subtracts -32768 (I bet this is why they added the multiply-add option for ARYOP) example program:
DIM I%[0]
LOAD "DAT:TEST.WAV",I%,0
DIM O%[LEN(I%)] 
ARYOP #AOPMAD,O%,I%,256,-32768
PCMSTREAM O%,rate
(for most old WAV files, the rate will be 8180Hz, but some use 16360 or 32720 (or very rarely: 16162 or 10910)