Displaying 2 results from an estimated 2 matches for "decode_int".
Did you mean:
decode_idt
2009 Mar 13
2
S32_LE to S16_LE
Hi developers,
I would appreciate if someone can give me a hand here...
I need to run speex on a FPU-less platform with an audio card that only
reads samples of type S32_LE (even when it is a 16bits audio card). I
understand that if my platform is FPU-less then I should use
speex_encode/decode_int() but then, how can I convert my S32_LE sample
to S16_LE in order to pass it to speex functions ?
thanks in advance...
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
...+
+int
+decode_bool (const char *buff, int *index, int *res)
+{
+ char atom[MAXATOMLEN];
+
+ if (ei_decode_atom (buff, index, atom) != 0) return -1;
+
+ if (atom_equals (atom, "true"))
+ *res = 1;
else
- return 0;
+ *res = 0;
+
+ return 0;
}
int
-get_int (ETERM *term)
+decode_int (const char *buff, int *index, int *res)
{
- switch (ERL_TYPE (term)) {
- case ERL_INTEGER:
- return ERL_INT_VALUE (term);
- case ERL_U_INTEGER:
- return (int) ERL_INT_UVALUE (term);
- case ERL_LONGLONG:
+ unsigned char c;
+ long l;
+ long long ll;
+
+ if (ei_decode_char (buff, index...