diff options
Diffstat (limited to 'libspeex/speex_header.c')
-rw-r--r-- | libspeex/speex_header.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libspeex/speex_header.c b/libspeex/speex_header.c index a495456..5900d36 100644 --- a/libspeex/speex_header.c +++ b/libspeex/speex_header.c @@ -1,22 +1,22 @@ -/* Copyright (C) 2002 Jean-Marc Valin +/* Copyright (C) 2002 Jean-Marc Valin File: speex_header.c Describes the Speex header Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -98,10 +98,10 @@ EXPORT void speex_init_header(SpeexHeader *header, int rate, int nb_channels, co header->speex_version[i]=SPEEX_VERSION[i]; for (;i<SPEEX_HEADER_VERSION_LENGTH;i++) header->speex_version[i]=0; - + header->speex_version_id = 1; header->header_size = sizeof(SpeexHeader); - + header->rate = rate; header->mode = m->modeID; header->mode_bitstream_version = m->bitstream_version; @@ -111,7 +111,7 @@ EXPORT void speex_init_header(SpeexHeader *header, int rate, int nb_channels, co header->bitrate = -1; speex_mode_query(m, SPEEX_MODE_FRAME_SIZE, &header->frame_size); header->vbr = 0; - + header->frames_per_packet = 0; header->extra_headers = 0; header->reserved1 = 0; @@ -122,9 +122,9 @@ EXPORT char *speex_header_to_packet(SpeexHeader *header, int *size) { SpeexHeader *le_header; le_header = (SpeexHeader*)speex_alloc(sizeof(SpeexHeader)); - + SPEEX_COPY(le_header, header, 1); - + /*Make sure everything is now little-endian*/ ENDIAN_SWITCH(le_header->speex_version_id); ENDIAN_SWITCH(le_header->header_size); @@ -164,9 +164,9 @@ EXPORT SpeexHeader *speex_packet_to_header(char *packet, int size) } le_header = (SpeexHeader*)speex_alloc(sizeof(SpeexHeader)); - + SPEEX_COPY(le_header, (SpeexHeader*)packet, 1); - + /*Make sure everything is converted correctly from little-endian*/ ENDIAN_SWITCH(le_header->speex_version_id); ENDIAN_SWITCH(le_header->header_size); |