*/ for (i=0;i<8;i++) header->speex_string[i]=h[i]; for (i=0;i<SPEEX_HEADER_VERSION_LENGTH-1 && VERSION[i];i++) header->speex_version[i]=VERSION[i]; for (;i<SPEEX_HEADER_VERSION_LENGTH;i++) header->speex_version[i]=0;
void speex_init_header(SpeexHeader *header, int rate, int nb_channels, SpeexMode *m){   strncpy(header->speex_string, "Speex   ", 8);   strncpy(header->speex_version, VERSION, SPEEX_HEADER_VERSION_LENGTH-1);   header->speex_version[SPEEX_HEADER_VERSION_LENGTH-1]=0;      header->speex_header_version = SPEEX_HEADER_VERSION;   header->header_size = sizeof(SpeexHeader);      header->rate = rate;   header->mode = m->modeID;   header->mode_bitstream_version = m->bitstream_version;   if (m->modeID<0)      fprintf (stderr, "This mode is meant to be used alone\n");   header->nb_channels = nb_channels;   header->bitrate = nb_channels * m->bitrate;   header->frame_size = m->frame_size;   header->vbr = m->vbr;      header->frames_per_packet = 0;   header->reserved1 = 0;   header->reserved2 = 0;   header->reserved3 = 0;}