Theory of Operations∞
#include <liquid/liquid.h>
int main() {
unsigned int num_bits = 4;
float mu = 255.0f;
unsigned int num_samples = 64;
// input sample
float x = 0.7f;
// compress sample
float v = compress_mulaw(x,mu);
// quantize: analog to digital converter
unsigned int q = quantize_adc(v,num_bits);
// quantize: digital to analog converter
float u = quantize_dac(q,num_bits);
// expand sample
float y = expand_mulaw(u,mu);
// compute error
float e = y - x;
return 0;
}