예제 #1
0
        public int SetOnePreprocessorSetting(PreprocessCtlCode setting, float value)
        {
            int retcode = 0;

            unsafe {
                float *floatPtr = &value;
                retcode = speex_preprocess_ctl(preprocessState, (int)setting, (void *)floatPtr);
            }
            return(retcode);
        }
예제 #2
0
        public int GetOnePreprocessorSetting(PreprocessCtlCode setting, ref bool value)
        {
            int retcode  = 0;
            int intValue = 0;

            unsafe {
                retcode = speex_preprocess_ctl(preprocessState, (int)setting, (void *)&intValue);
            }
            value = (intValue == 0 ? false : true);
            return(retcode);
        }
예제 #3
0
        public int SetOnePreprocessorSetting(PreprocessCtlCode setting, bool bValue)
        {
            int value   = (bValue ? 1 : 0);
            int retcode = 0;

            unsafe {
                int *intPtr = &value;
                retcode = speex_preprocess_ctl(preprocessState, (int)setting, (void *)intPtr);
            }
            return(retcode);
        }
예제 #4
0
        public int GetOnePreprocessorSetting(PreprocessCtlCode setting, ref int value)
        {
            int retcode = 0;

            unsafe
            {
                fixed(int *intPtr = &value)
                {
                    retcode = speex_preprocess_ctl(preprocessState, (int)setting, (void *)intPtr);
                }
            }
            return(retcode);
        }