carlos12
Experienced Member
I've being doing a research for PCM samples compression for such an early processor as the 8086/88, for being played on the internal speaker, parallel port devices and SB and compatibles . The requirements I look for are: it must be fast, as the target processors I chose are quite slow; it must work in real mode and without 286+ instructions; the binary code must be small as on those platforms every byte counts, and every byte used on the program is a byte that cannot be used to store graphics and sounds. The first solutions I found, without using compressors, are so far:
- Using 8 bit mono samples, which is fine as I plan to target the lowest common denominator.
- Reducing the sample rate so the files will be smaller (although worse quality)
- Trimming beginning and end silences
But aside these I wanted to do some real compression. Unfortunately, the general use compressors doesn't seem to compress a thing with audio. So I found a few specific audio compressors/decompressors that work on the 8088:
- Audio Compression by John W. Ratclif. I liked a lot because there's a version written in assembly language, so it's fast and the generated code is quite small, and it really compresses a lot while not reducing, apparently, the quality of the sound. The problem is that while the decompressed sound plays perfectly on the speaker and LPT DAC, it does not play on the Sound Blaster, at least not trough the CT-VOICE driver. I haven't yet tried playing sending the PCM data directly to the DMA channel. I found it here: https://www.drdobbs.com/database/audio-compression/184408798 On this moment it's the one I liked the most.
- Creative ADPCM. As it was said on another thread on this forum, it's compressed using a Creative utility. The sample loses quite quality and, as it was said on the other thread, it's compressed to a format that can be used only with real Sound Blasters. So I discarded it.
- MPEG Layer II (MP2). Copyright (c) 1991 MPEG/audio software simulation group. I think this may be the best solution, as it makes so tiny files. I found the sources in C language but I didn't tried yet as it looks very complex to implement, there are many C files and they are quite large so while I have no warranty it will work well on the 8088, they may take a lot of room from my program.
- ADPCM Stichting Mathematisch Centrum, Amsterdam, The Netherlands. Intel/DVI ADPCM coder/decoder. I haven't tried it yet. It's written in C but at least the decoder function is quite small.
Do you know other audio compression algorithms that may work for the 8086/88?
Thank you very much for your opinions and help.
- Using 8 bit mono samples, which is fine as I plan to target the lowest common denominator.
- Reducing the sample rate so the files will be smaller (although worse quality)
- Trimming beginning and end silences
But aside these I wanted to do some real compression. Unfortunately, the general use compressors doesn't seem to compress a thing with audio. So I found a few specific audio compressors/decompressors that work on the 8088:
- Audio Compression by John W. Ratclif. I liked a lot because there's a version written in assembly language, so it's fast and the generated code is quite small, and it really compresses a lot while not reducing, apparently, the quality of the sound. The problem is that while the decompressed sound plays perfectly on the speaker and LPT DAC, it does not play on the Sound Blaster, at least not trough the CT-VOICE driver. I haven't yet tried playing sending the PCM data directly to the DMA channel. I found it here: https://www.drdobbs.com/database/audio-compression/184408798 On this moment it's the one I liked the most.
- Creative ADPCM. As it was said on another thread on this forum, it's compressed using a Creative utility. The sample loses quite quality and, as it was said on the other thread, it's compressed to a format that can be used only with real Sound Blasters. So I discarded it.
- MPEG Layer II (MP2). Copyright (c) 1991 MPEG/audio software simulation group. I think this may be the best solution, as it makes so tiny files. I found the sources in C language but I didn't tried yet as it looks very complex to implement, there are many C files and they are quite large so while I have no warranty it will work well on the 8088, they may take a lot of room from my program.
- ADPCM Stichting Mathematisch Centrum, Amsterdam, The Netherlands. Intel/DVI ADPCM coder/decoder. I haven't tried it yet. It's written in C but at least the decoder function is quite small.
Do you know other audio compression algorithms that may work for the 8086/88?
Thank you very much for your opinions and help.