コード例 #1
0
        public int InitEncoder(int maxFrameSize, int samplesPerFrame, int samplingRate)
        {
            this.maxFrameSize = maxFrameSize;
            encodedBits       = new SpeexBits();
            encoderState      = speex_encoder_init_new(0);
            // Don't set VAD in the codec, because we're setting it in
            // the preprocessor instead
            fixed(int *fSize = &frameSize)
            {
                speex_encoder_ctl(encoderState, (int)SpeexCtlCode.SPEEX_GET_FRAME_SIZE, fSize);
            }

            fixed(SpeexBits *bitsAdd = &encodedBits)
            {
                speex_bits_init(bitsAdd);
            }

            preprocessState = speex_preprocess_state_init(samplesPerFrame, samplingRate);
            return(frameSize);
        }
コード例 #2
0
 public static extern int speex_preprocess_ctl(SpeexPreprocessState *st, int request, void *ptr);
コード例 #3
0
 public static extern int speex_preprocess_run(SpeexPreprocessState *st, short *x);
コード例 #4
0
 public static extern void speex_preprocess_estimate_update(SpeexPreprocessState *st, short *x);
コード例 #5
0
 public static extern void speex_preprocess_state_destroy(SpeexPreprocessState *st);