Skip to content

CCSpeakerCodecs

Adds a collection of alternate transit codecs for CC: Tweaked speakers to improve audio quality.

FabricForge
Loaders
FabricForge
Downloads on Modrinth
18
Followers on Modrinth
0
version
1
Updated
May 7, 2026May 7
Published
in 2026

At a glance

Runs on Fabric and Forge
For Minecraft 1.20.1
Needed in the game and on the server
Latest version — 0.1.1 from May 7, 2026
License MPL-2.0 — free
Where it's needed
In gamerequiredOn serverrequired

Needed both in the game and on the server

Game versions1.20.1

CCSpeakerCodecs

Adds a collection of alternative transit codecs for CC: Tweaked speakers to enhance audio quality.

Theory

CC: Tweaked speakers internally use the 1 bit per sample DFPWM codec in transit to reduce bandwidth while keeping a high audio sample rate. It works fairly well for audio mostly below ~2000 Hz with little high frequency components, but it starts to break down when the high-frequency components are important - for example, in a waveform with sharp edges (which create harmonics), such as square/sawtooth waves.

Since DFPWM has a pretty hard frequency shelf at 12 kHz, I figured that reducing the sample rate wouldn't have as much of an impact and would leave room to use a better codec like ADPCM. So that's what this mod does - it lets the user switch to higher bit depth codecs at the expense of sample rate.

All codecs are limited to up to the same 48 kbps rate as DFPWM, with the rate scaled down to fit. The speaker still takes in the same 48 kHz sample rate, but samples are skipped to hit the sample rate target - high-performance applications can ignore the skipped samples and set them to 0.

Over the network, the audio packets are made backwards compatible with clients and servers without this mod installed. Extended codec packets are encoded as empty DFPWM packets followed by the actual data, which makes unaware clients decode an empty packet when an unsupported codec is used. DFPWM codec packets remain the same format, so unaware clients still receive a valid packet & unaware servers are still sending a supported packet.

Codecs

Codecb/sampleSample rateSpeedQuality
dfpwm148000⭐⭐⭐⭐⭐⭐
qoa3.212000⭐⭐⭐⭐⭐⭐⭐
adpcm2224000⭐⭐⭐⭐⭐⭐
adpcm3316000⭐⭐⭐⭐⭐⭐
adpcm412000⭐⭐⭐⭐⭐
adpcm559600⭐⭐⭐⭐
opus^*48000⭐⭐⭐⭐⭐⭐⭐⭐⭐
qoa+^3.216000⭐⭐⭐⭐⭐⭐⭐⭐

^ Disabled by default.

Codecchipneve.xm (chiptune, no interpolation)Yahtzee.xm (low sample rate GBA module, linear interpolation)Stereo Madness 2 (WAV, 48 kHz 16-bit)
dfpwmhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/DFPWM%20chipneve.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/DFPWM%20yahtzee.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/DFPWM%20sm2.wav
qoahttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/QOA%20chipneve.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/QOA%20yahtzee.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/QOA%20sm2.wav
adpcm2https://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM2%20chipneve.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM2%20yahtzee.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM2%20sm2.wav
adpcm3https://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM3%20chipneve.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM3%20yahtzee.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM3%20sm2.wav
adpcmhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM4%20chipneve.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM4%20yahtzee.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM4%20sm2.wav
adpcm5https://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM5%20chipneve.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM5%20yahtzee.wavhttps://raw.githubusercontent.com/MCJack123/CCSpeakerCodecs/master/demos/ADPCM5%20sm2.wav

Codec options

Some codecs accept additional options in a table passed as the second parameter to setAudioCodec. These are the following options available:

interpolation: boolean

Available in: qoa, adpcm2, adpcm3, adpcm, adpcm5

Sets whether the audio is interpolated (linearly) on the client side. Defaults to true.

Interpolation smoothens out the audio and makes it less crunchy, but the crunch may be desired for some audio, so the option is made available just in case.

bufferSize: number

Available in: opus

Controls the size of the audio buffer/minimum frame size in samples. May be any of 120, 240, 480, 960, or 1920. Defaults to 960.

Lower values will reduce the audio delay from buffering, but can cause clicks due to the smaller buffers having lower quality encoding. Notably, values of 120 and 240 are significantly worse than the higher values.

Usage

Simply call the new speaker.setAudioCodec(codec: string[, options: table]) method to set the codec. Future playAudio calls will use this codec automatically, with no format changes necessary.

License

The core mod is licensed under MPL 2.0, like CC:T. Portions are taken from third-party projects licensed under other terms - see LICENSE.txt for more info.

FAQ

How to install CCSpeakerCodecs?

Install Fabric for your Minecraft version, download CCSpeakerCodecs for the same version and loader, put the file into the mods folder and launch the game with the loader profile.

Which Minecraft versions does CCSpeakerCodecs support?

CCSpeakerCodecs has builds for Minecraft 1.20.1.

Is CCSpeakerCodecs needed on the server?

Needed in the game and on the server

License and source
Mozilla Public License 2.0free to use and share; changes to the mod itself must be published under the same license
Original — Modrinth↗Files unchanged, verified with SHA-512Is this your mod? For rights holders

The site uses cookies: the necessary ones for sign-in and the theme, plus the Yandex Metrica and LiveInternet visit counters — they show us how the site is used. We have no advertising cookies. More