void process(float *io_data) { int i, code; for (i=0; i<BLOCK_SIZE; i++) { switch (coder) { case CT_MULAW: code = ulaw_compress(io_data[i]); io_data[i] = ulaw_expand(code); break; case CT_QUAN: code = quan(&cqdat, io_data[i]); io_data[i] = iquan(&dqdat, code); break; case CT_DPCM: io_data[i] = 0; break; case CT_ADPCM: io_data[i] = 0; break; default: io_data[i] = 0; break; } } }
void turn(int x) { int i,len=wei(x),j,f; for(i=0;i<len;i++) { for(f=1;f+(x%d[i+1])/d[i]<=9;f++) { np[x+f*d[i]]=1; } } if(6 == len) { return ; } x=x*10; np[x]=1; len++; j=10; while(len < 6) { quan(x,j); j=j*10; len++; x=x*10; } }