[speex-dev] querying submodes

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Wed Mar 31 12:42:37 PST 2004

> This works well.  Now a followup question.  Is there a way to know how 
> many sub-modes exist? I ask because I found out that i will crash if I 
> try to pass in an invalid sub-mode value.  I can probably determine 
> this out by looking at the source code, but ideally it would be nice 
> for it to be determined at run-time so that I can build UI that lets 
> the user choose various speex settings without hard-coding values.

Actually, the query function *should* (otherwise, it's a bug) return -1
if the submode doesn't exist. 

> (I assume that the quality setting of 0-10 does not have a 1:1 
> correspondence to submodes yes?  For example, it looks like narrowband 
> quality 7 and 8 are the same, is that accurate?)

That's right, there are only 8 submodes for narrowband (9 if you count
the "no transmit" mode) and 11 quality settings (including quality 0),
so there has to be dupes.


Jean-Marc Valin
Université de Sherbrooke, Québec, Canada

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée.
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040331/435e5812/signature-0001.pgp

More information about the Speex-dev mailing list