Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TorutheRedFox opened this issue Sep 27, 2019 · 4 comments

Comments

@TorutheRedFox
Copy link

No description provided.

@Thealexbarney
Copy link
Owner

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;

@TorutheRedFox
Copy link
Author

thx

@TorutheRedFox
Copy link
Author

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

@TorutheRedFox
Copy link
Author

just saying, it comes out waay too loud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants