Adpcm Compression (8-16 Bit)

Hi all, there’s someone can help me about adpcm compression used on MOD / XM ?

I would to implement sample conversion on xrns2xmod converter, but I can’t find any lib/sources for a wav adpcm compression…

Request changed, maybe I need a flac to wav converter library or source…

The FLAC command line utility lets you decompress a flac file into wav using the -d switch, example:

flac -d /path/to/your.flac

Maybe you can temporarily pass off the work to the terminal? Then continue your conversion once you get a wav file?

Hi Conner, problem is not only the result but the input too, because I would work only with byte streams, and flac is under the xrns :wacko: . Calling from executable looks to difficult.

I found some lib in C/C++ but I haven’t figured out yet how to manage them in .NET.

Have you looked at g.722? My guess is XM ADPCM would be based on that but I have no evidence to support it. There are a few open source programs that can play XM that have used their ADPCM so may be worth contacting the Devs of one (or more) of them.

Thanks I’ll looking for this.

Btw seems adpcm compression is not my primary problem but flac conversion instead…

Really? But FLAC’s an open standard isn’t it? Doesn’t this help?

Who is who wrote Flic Flac on here? Maybe they can help? Or maybe Taktik can point you towards the resources he used for FLAC in Renoise?

Guess quite a lot of it depends on your programming language though…

yep maybe this can help me

Guess I should call these functions from C sharp tought dllImport, but it’s not easy for me :)

Thanks for the advice, hope tomorrow I’ll get some good results

Here is a small tip… to make the FLAC library compatible to the one used by Renoise (support for 32bit FLACs) change the definition of “FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE” from “24u” to “32u” in “format.h”.

Ok, I finally found a nice and simple flac 2 wav converter for C#.

Next target is to put wav data to xm hoping everything goes well.

I don’t know if sample loop data will be ported, because loopStart/loopEnd is based on sample length, and course wav len is different from flac.

But this is just a secondary prob :)

Thanks to all!