Ejemplo n.º 1
0
 public static object speex_encoder_init(SpeexMode mode)
 {
     return mode.enc_init(mode);
 }
Ejemplo n.º 2
0
 public int speex_decoder_ctl(SpeexMode state, int request, void* ptr)
 {
     return state.dec_ctl(state, request, ptr);
 }
Ejemplo n.º 3
0
 public object speex_decoder_init(SpeexMode mode)
 {
     return mode.dec_init(mode);
 }
Ejemplo n.º 4
0
 public int speex_encoder_ctl(SpeexMode state, int request, object ptr)
 {
     return state.enc_ctl(state, request, ptr);
 }
Ejemplo n.º 5
0
        public SpeexHeader(int rate, int nb_channels, SpeexMode m)
        {
            int i;
            byte[] h = { 'S', 'p', 'e', 'e', 'x', ' ', ' ', ' ' };

            /*
            strncpy(header->speex_string, "Speex   ", 8);
            strncpy(header->speex_version, SPEEX_VERSION, SPEEX_HEADER_VERSION_LENGTH-1);
            header->speex_version[SPEEX_HEADER_VERSION_LENGTH-1]=0;
            */
            for (i = 0; i < 8; i++)
                this.speex_string[i] = h[i];
            for (i = 0; i < SPEEX_HEADER_VERSION_LENGTH - 1 && SPEEX_VERSION[i]; i++)
                this.speex_version[i] = SPEEX_VERSION[i];
            for (; i < SPEEX_HEADER_VERSION_LENGTH; i++)
                this.speex_version[i] = 0;

            this.speex_version_id = 1;
            this.header_size = Marshal.SizeOf(this);

            this.rate = rate;
            this.mode = m.modeID;
            this.mode_bitstream_version = m.bitstream_version;

            if (m.modeID < 0)
                speex.warning("This mode is meant to be used alone");

            this.nb_channels = nb_channels;
            this.bitrate = -1;
            speex_mode_query(m, SPEEX_MODE_FRAME_SIZE, &this.frame_size);
            this.vbr = 0;

            this.frames_per_packet = 0;
            this.extra_headers = 0;
            this.reserved1 = 0;
            this.reserved2 = 0;
        }