Displaying 9 results from an estimated 9 matches for "getstringutfchars".
2012 Mar 14
0
Audio file is corrupted after decoding
...says
that the file has been corrupted.
ENCODING:
#include <jni.h>
#include <stdio.h>
#include "speex/speex.h"
#define FRAME_SIZE 320
void Java_com_m2_iSmartDm_ISmartDMActivity_spxEnc(JNIEnv * env, jobject
jobj,jstring dir1,jstring dir2)
{
const char *inFile= (*env)->GetStringUTFChars(env,dir1,0);
const char *outFile= (*env)->GetStringUTFChars(env,dir2,0);
FILE *fin;
FILE *fout;
short in[FRAME_SIZE];
float input[FRAME_SIZE];
char cbits[360];
int nbBytes;
void *state;
SpeexBits bits;
int i, tmp;
state = speex_encoder_init(&speex_wb_mode);
tm...
2012 Mar 07
1
Error while decoding the audio file.
I have successfully encoded a wav file in android using speex(ndk). But when i try to decode it back, the file size keep on increasing to a very large size.
The recorded audio file consists of sample rate - 8000 , 16 BIT, MONO. Why the decoder gives such a large size wav file?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880
https://bugzilla.redhat.com/show_bug.cgi?id=847881
This patch series adds various optional arguments to the tar-in and
tar-out commands.
Firstly (1/7) an optional "compress" flag is added to select
compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out
deprecated, and expands the range of compression types available.
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi,
this patch serie adds a new GUID type in the generator, which would do
the same as String, but also validating (just in the C output) the
passed GUID string.
This allows to reject invalid GUIDs before passing them to low-level
tools.
Pino Toscano (4):
utils: add a function to validate a GUID string
generator: add a GUID parameter type
generator: generate code for parameter validation
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally
useful to any binding which uses camel case by requirement or convention.
---
generator/generator_haskell.ml | 4 ++--
generator/generator_java.ml | 10 +++++-----
generator/generator_main.ml | 2 +-
generator/generator_structs.ml | 12 +++++-------
generator/generator_structs.mli | 8 ++++----
5
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky
for development (too easy to miss new ones) so I spent some
time last week and today working on removing them.
The first patch gets us down to almost no warnings with
the original -Wall setting. That was by far the hardest part.
Once I'd done that, I enabled nearly all of gcc's warnings via
gnulib's warnings and manywarnings modules
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...> true | _ -> false) (snd style) in
if needs_i then
- pr " int i;\n";
+ pr " int i;\n";
pr "\n";
(* Get the parameters. *)
List.iter (
- function
- | String n
- | FileIn n
- | FileOut n ->
- pr " %s = (*env)->GetStringUTFChars (env, j%s, NULL);\n" n n
- | OptString n ->
- (* This is completely undocumented, but Java null becomes
- * a NULL parameter.
- *)
- pr " %s = j%s ? (*env)->GetStringUTFChars (env, j%s, NULL) : NULL;\n" n n n
- | StringList n ->
- pr " %s_len = (...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...List.iter (
function
- | Pathname n
- | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n
- | String n
- | FileIn n
- | FileOut n
- | Key n
- | GUID n ->
+ | String (_, n) ->
pr " %s = (*env)->GetStringUTFChars (env, j%s, NULL);\n" n n
| OptString n ->
(* This is completely undocumented, but Java null becomes
@@ -788,7 +763,7 @@ throw_out_of_memory (JNIEnv *env, const char *msg)
| BufferIn n ->
pr " %s = (char *) (*env)->GetByteArrayElements...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator.
Rich.