Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / Decode ADPCM Voice Samples

Author
Message
Xaby
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 7th Apr 2017 16:12 Edited at: 7th Apr 2017 16:45
Hallo AppGameKit users,

I am proud to present you a native ADPCM decoder in AppGameKit 2 Tier1 Basic.
I converted the code in the best way I could. I don't understand, how Pointers work in AGK. So I had to use some variables global.
The C-Code is from here. http://faculty.salina.k-state.edu/tim/software/vox/vox.html#the-standard

This could be the beginning of some native format decoders. Maybe also encoders. ADPCM is a lossy AudioCompression with 1:4 compression ratio.
I don't realy know, I there is a need for, because AppGameKit can load OGG-Files and with 50% quality of an OGG, the OGG is smaller and cloud sound nearly the same.
But insteat of uncompressed WAVE RIFF PCM you could save space. And maybe I will later implement also an Encoder and Header-Writer, so we could have native IMA ADPCM in a WAVE RIFF Container or so.

This code is not bullet proof. If you use a great file, it will crash, there is no memory test. I used AudaCity to create the VOX-file and to test it back.
http://www.audacityteam.org/

What is ADPCM
https://de.wikipedia.org/wiki/Adaptive_Differential_Pulse_Code_Modulation

The idea I had in mind was, to be able to decode maybe more complex music formats like ADX
https://en.wikipedia.org/wiki/ADX_(file_format)
ADPCM is also used in game music. The Nintendo 64 supports native ADPCM and I think, the SNES is also capable to decode ADPCM.

For music there are some other formats, I am interested in and working on. (Tracker *hust* *hem* *hem* )

The master you could find here
http://samples.mplayerhq.hu/A-codecs/CovoxFormats/
It's "woman_16-bit_44KHz_master.wav " about 485 KBytes and the VOX is only 121 KBytes.

The ZIP contains the project (without the *.EXE) and the VOX-file for testing.




Please comment, what you are thinking of native support for other audio formats, or maybe other document types. And maybe you could tell me, how the global varible could be referenced like a pointer.
In Pascal the could do so, if you wrote the type of the variable in the function before the name of the variable.

Attachments

Login to view attachments
nz0
AGK Developer
11
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 4th Jun 2017 00:29
Just so someone responds to your post, well done!

I don't have any need for such a thing, but I am working on something *big* tracker wise, but it's a plugin.

I'll be able to deliver MO3 formatted mods with access to peak, channel, FFT, instrument - the lot

I applaud your work here - it's cool stuff, but as I only work in the Windows platform I'm focusing my efforts on plugins for this area. You refer to pascal so are you familiar with Delphi? I use Delphi for my plugins.
Using an external library, I can leverage audio manipulation way outside of native AppGameKit capability and judging by responses to your post, I don't think many users "get" what you've done here.

Maybe we can work on something in this area? I will put a demo together soon that will be pretty amazing for sure using the stuff I've been working on..

I already added a very basic plugin for FMOD to the list of plugins here, but am working with BASS now, which is far better.

Login to post a reply

Server time is: 2019-05-23 10:55:00
Your offset time is: 2019-05-23 10:55:00