VGAudio icon indicating copy to clipboard operation
VGAudio copied to clipboard

How do you correctly use the library? (specifically to decode ADX to PCM byte array)

Open TorutheRedFox opened this issue 5 years ago • 4 comments

TorutheRedFox avatar Sep 27 '19 15:09 TorutheRedFox

This would be one easy way to get a wave file:

byte[] adxFile;

AudioData audio = new AdxReader().Read(adxFile);
byte[] waveFile = new WaveWriter().GetFile(audio);

Or to get the PCM data:

var pcm16 = audio.GetFormat<Pcm16Format>();
short[][] channels = pcm16.Channels;

Thealexbarney avatar Sep 29 '19 15:09 Thealexbarney

thx

TorutheRedFox avatar Oct 06 '19 10:10 TorutheRedFox

although, I'm using this in Unity, and Unity requires it to be as one byte array (even when data is stereo)

TorutheRedFox avatar Oct 06 '19 10:10 TorutheRedFox

just saying, it comes out waay too loud

TorutheRedFox avatar Oct 06 '19 11:10 TorutheRedFox