少年修仙传客户端代码仓库
client_Hale
2019-04-15 f99a0cd6ed9f5df666b19549e6a7de9bf9b9e9c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespace NSpeex
{
    using System;
 
    internal class NoiseSearch : CodebookSearch
    {
        public sealed override void Quantify(float[] target, float[] ak, float[] awk1, float[] awk2, int p, int nsf, float[] exc, int es, float[] r, Bits bits, int complexity)
        {
            int num;
            float[] y = new float[nsf];
            Filters.Residue_percep_zero(target, 0, ak, awk1, awk2, y, nsf, p);
            for (num = 0; num < nsf; num++)
            {
                exc[es + num] += y[num];
            }
            for (num = 0; num < nsf; num++)
            {
                target[num] = 0f;
            }
        }
 
        public sealed override void Unquantify(float[] exc, int es, int nsf, Bits bits)
        {
            for (int i = 0; i < nsf; i++)
            {
                exc[es + i] += (float)(3.0 * (new Random().NextDouble() - 0.5));
            }
        }
    }
}