> 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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Hello everyone, I'm finally beginning to use Speex for a project. As expected, the implementation so far has been very easy and I am thrilled with the capabilities and flexibility of Speex, especially the new features in 1.1. My efforts so far have resulted in a couple of questions: 1) I was interested in fetching the default quality setting for narrowband: speex_encoder_ctl(_encodeState, SPEEX_GET_QUALITY, &value); Unfortunately, the above fails with libspeex 1.1.4. The console shows: warning: Unknown nb_ctl request: 5 There was a report of this issue back in September with a reply indicating that this was fixed, but I'm still seeing the problem as of this version. Not a big deal, I'm going to set the quality to a value anyway, just thought I'd report the issue. 2) Let's say I wish to encode some data. Speex can tell me the uncompressed frame size (for narrowband, 160 * sizeof(short)), but what about the size of the compressed data? If I'm not using VBR, I assume that size is going to be constant, yes? But is there a way for Speex to tell me what that value is before I begin encoding? thanks much, Chris <p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> 1) I was interested in fetching the default quality setting > fornarrowband: > speex_encoder_ctl(_encodeState, SPEEX_GET_QUALITY, &value); > > Unfortunately, the above fails with libspeex 1.1.4. The console > shows: > > warning: Unknown nb_ctl request: 5Actually, I never implemented SPEEX_GET_QUALITY. It's not that usefule anyway, but I might do it in the future.> 2) Let's say I wish to encode some data. Speex can tell me > theuncompressed frame size (for narrowband, 160 * sizeof(short)), > butwhat about the size of the compressed data? If I'm not using VBR, > Iassume that size is going to be constant, yes? But is there a way > forSpeex to tell me what that value is before I begin encoding?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. Jean-Marc -- Jean-Marc Valin http://www.xiph.org/~jm/ LABORIUS 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/19c6b6e0/signature-0001.pgp