Documentation, cleanup, comments
git-svn-id: http://svn.xiph.org/trunk/speex@3322 0101bb08-14d6-0310-b084-bc0e0c8e3800
diff --git a/html/index.html b/html/index.html
index 55701cb..d3bef57 100644
--- a/html/index.html
+++ b/html/index.html
@@ -1,139 +1,15 @@
-<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en"><html><head>
-
-
-
-
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+ <TITLE>Table des matières</TITLE>
+ <META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
+</HEAD>
+<BODY BGCOLOR="#ffffff">
-
-
-
-
-
- <meta name="GENERATOR" content="Mozilla/4.78 [fr] (X11; U; Linux 2.4.17 i686) [Netscape]">
-
-
-
-
-
-
-
- <meta name="Author" content="Jean-Marc Valin">
- <title>The Speex Speech Codec</title>
-
-
-
-
-
-
- </head>
-
-<body text="#000000" bgcolor="#ffffff" link="#0000ef" vlink="#59188e" alink="#ff0000">
-
-<center>
-<img src="speex.png" alt="Speex">
-</center>
-<br>
-<br>
-
-
- <a href="http://sourceforge.net/projects/speex">The Speex project</a>
- aims to build an open-source (LGPL) patent-free voice codec. Unlike
- other codecs like MP3 and <a href="http://www.vorbis.org/">Ogg Vorbis</a>, Speex is specially designed for compressing voice at low bit-rates
- for applications such as voice over IP (VoIP). In some sense, it is meant
- to be complementary to the Ogg Vorbis codec.
-<p>If you are interested in participating to the project, contact us at <a href="mailto:speex-devel@lists.sourceforge.net">
- speex-devel@lists.sourceforge.net</a> or <a href="http://lists.sourceforge.net/lists/listinfo/speex-devel">
- join our mailing list</a>. Right now, we are mostly looking for
- developers with signal processing and speech coding knowledge, as well
- as people with knowledge about patents in that field.<br>
- </p>
-
-
-
-
-<h2>Download</h2>
-
-
-
- You can download Speex from <a href="http://sourceforge.net/project/showfiles.php?group_id=46651">
- here</a>.<br>
-
-
-
-
-<h2>News</h2>
-
-
-<h3>2002/05/15</h3>
-
-Speex 0.1.0 has been released. Speex now uses the Ogg bitstream (using libogg). That means that
-there is now (limited) bitstream error recovery. Also, the narrowband bit-rate has been reduced
-from 15.7 kbps to 15.1 kbps and the wideband bit-rate has been reduced from 31.3 kbps to 27.7 kbps.
-The quality remains roughly the same for both narrowband and wideband.
-Once again, this breaks compatibility with previous versions.
-
-<h3>2002/05/07</h3>
-
-Speex 0.0.3 released.
-
-<h3>2002/04/15</h3>
-
-
-
- Speex version 0.0.2 has been released. This release provides much improved
- wideband quality at an only slightly higher bit-rate of 31.3 kbps. This
-means that the wideband Speex files are not compatible with those of the 0.0.1
-release. The narrowband codec (at 14.5 kbps) is however exactly the same
-as in 0.0.1. <br>
-
-
-
-
-<h3>2002/03/27</h3>
-
-
-
- Speex 0.0.1 has been released. This first version of Speex supports
- fixed bit-rate encoding at 14.5 kbps for speech sampled at 8 kHz (narrowband)
- and at 28.5 kbps for 16 kHz (wideband) speech. Future releases will likely
- provide a wider choice of bit-rates, better quality, as well as variable
- bit-rate (VBR) and discontinuous transmission (DTX).<br>
-
-
-
- <br>
-
-
-
- Note that this is a preliminary release and that bit-rates, quality
- and bitstream definition will change in the future. This means that
-the format used in this release will not be compatible with future releases.
- Also note that this software has so far received only a minimum amount
- of testing, so it may break or do unexpected things.<br>
-
-
-
-<h3>2002/03/12</h3>
-
-
-
- We now have a working encoder prototype that produces good quality
- narrowband (8 kHz sampling rate) at a bit-rate of 14.5 kb/s. There is
- still a lot to do, but we're progressing fast.<br>
-
-
-
-
-<hr width="100%" size="2">
-<div align="right"><img src="http://sourceforge.net/sflogo.php?group_id=46651&amp;type=5" alt="SourceForge Logo">
-<br>
-<a href="mailto:valj01@gel.usherb.ca">Jean-Mrc Valin</a> <br>
- <a href="mailto:david@voicetronix.com.au">David Rowe</a> <br>
- $Date: 2002/05/20 22:10:02 $</div>
-
-
-
-
-</body></html>
+<H1>Table des matières</H1>
+<HR>
+<BR>
+This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
+</BODY>
+</HTML>
diff --git a/html/speex.png b/html/speex.png
index e76304f..4db2873 100644
--- a/html/speex.png
+++ b/html/speex.png
Binary files differ
diff --git a/html/speex.xcf b/html/speex.xcf
index 9ffdc3d..e554712 100644
--- a/html/speex.xcf
+++ b/html/speex.xcf
Binary files differ
diff --git a/libspeex/bits.c b/libspeex/bits.c
index 7602a3d..6be836a 100644
--- a/libspeex/bits.c
+++ b/libspeex/bits.c
@@ -54,7 +54,7 @@
bits->bitPtr=0;
}
-void speex_bits_init_from(SpeexBits *bits, char *bytes, int len)
+void speex_bits_read_from(SpeexBits *bits, char *bytes, int len)
{
int i;
if (len > MAX_BYTES_PER_FRAME)
diff --git a/libspeex/speex.h b/libspeex/speex.h
index ade6fd5..25c4ae7 100644
--- a/libspeex/speex.h
+++ b/libspeex/speex.h
@@ -22,12 +22,12 @@
#ifndef SPEEX_MODES_H
#define SPEEX_MODES_H
+#include "speex_bits.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "speex_bits.h"
-
struct SpeexMode;
typedef void *(*encoder_init_func)(struct SpeexMode *mode);
diff --git a/libspeex/speex_bits.h b/libspeex/speex_bits.h
index e539c95..545d863 100644
--- a/libspeex/speex_bits.h
+++ b/libspeex/speex_bits.h
@@ -22,6 +22,10 @@
#ifndef BITS_H
#define BITS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MAX_BYTES_PER_FRAME 1000
/** Bit-packing data structure representing (part of) a bit-stream. */
@@ -44,9 +48,8 @@
/** Rewind the bit-stream to beginning (ready for read) without erasing content*/
void speex_bits_rewind(SpeexBits *bits);
-/** Initializes the bit-stream from the data in an area of memory (no need to
- call speex_bits_init before) */
-void speex_bits_init_from(SpeexBits *bits, char *bytes, int len);
+/** Initializes the bit-stream from the data in an area of memory */
+void speex_bits_read_from(SpeexBits *bits, char *bytes, int len);
void speex_bits_read_whole_bytes(SpeexBits *bits, char *bytes, int len);
@@ -61,5 +64,8 @@
unsigned int speex_bits_unpack_unsigned(SpeexBits *bits, int nbBits);
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/src/speexdec.c b/src/speexdec.c
index b31dde8..36ce0e8 100644
--- a/src/speexdec.c
+++ b/src/speexdec.c
@@ -179,7 +179,7 @@
if (strncmp((char *)op.packet, "END OF STREAM", 13)==0)
break;
/*Copy Ogg packet to Speex bitstream*/
- speex_bits_init_from(&bits, (char*)op.packet, op.bytes);
+ speex_bits_read_from(&bits, (char*)op.packet, op.bytes);
/*Decode a frame*/
speex_decode(st, &bits, output, 0);