[speex-dev] querying submodes

Chris Silverberg chris at silverberg.net
Wed Mar 31 12:37:07 PST 2004



> Use speex_mode_query with SPEEX_SUBMODE_BITS_PER_FRAME
> You need to pass the submode number with the pointer and the number of
> bits per frame is returned using the same pointer. Note that with
> speex_mode_query, the first argument is the mode (e.g. &speex_nb_mode),
> not the encoder/decoder state.

Thank you Jean-Marc,

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.

(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?)

thanks,
-Chris

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list