search for: nslog

Displaying 20 results from an estimated 24 matches for "nslog".

Did you mean: slog
2011 Jun 02
1
Any tips for speeding up encoding on iPhone?
...if we have enough samples for a frame if (_toCompressBuffer.size >= speexFrameSize * sizeof(short)) { // fill frame with samples //memcpy(input, _toCompressBuffer.data, speexFrameSize * sizeof(short)); // process one frame at a time NSLog(@"Start encode"); speex_bits_reset(&speexBits); //speex_encode_int(speexEncoderState, input, &speexBits); speex_encode_int(speexEncoderState, _toCompressBuffer.data, & speexBits); // without using extra buffer UInt16 nbBytes...
2013 Jan 30
0
[LLVMdev] Calling dispatch_async() within call to ExecutionEngine::runFunction()
I have used libdispatch (on FreeBSD) from JIT'd code without any issues, so I think your bug is elsewhere. David On 30 Jan 2013, at 07:43, Rick Mann wrote: > My host app calls runFunction() on my JITed code. It, in turn, calls a C function ("decode()") in the host app that then calls dispatch_async(). The runFunction() call returns as expected, but the block passed to
2013 Jan 30
3
[LLVMdev] Calling dispatch_async() within call to ExecutionEngine::runFunction()
My host app calls runFunction() on my JITed code. It, in turn, calls a C function ("decode()") in the host app that then calls dispatch_async(). The runFunction() call returns as expected, but the block passed to dispatch_async() never gets called. The async block is supposed to call a function pointer callback that was passed in to decode(). Everything is being called on the main
2009 Jan 27
4
[LLVMdev] RFC: -fwritable-strings Change
There is a problem with Objective-C code where a null string is placed in the wrong section. If we have this code: #include <Foundation/Foundation.h> void foo() { NSLog(@""); } The null string is defined like this: .const .lcomm LC,1,0 ## LC Causing our linker to go nuts, because it expects anonymous strings to be in the __cstring section. I came up with the attached patch, which places the string in the .cstring section. My GCC-fu isn't great...
2009 Oct 19
3
[LLVMdev] Objective-C code in lli
Hi, Is it possible to run Objective-C code in lli? lli does not seem to want to load Foundation.framework. Please see below. Thanks, Eric Brunstad #import <Foundation/Foundation.h> int main(int argc, char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"test!"); [pool drain]; return EXIT_SUCCESS; } cmu-351714:llvm-2.5 ericbrunstad$ /Users/ericbrunstad/Downloads/ llvm-2.5/Release/bin/lli -force-interpreter=true -stats /Users/ ericbrunstad/Desktop/test/test.o -load=/System/Library/Frameworks/ Foundation.framework/Foundation Could...
2009 Jan 27
0
[LLVMdev] RFC: -fwritable-strings Change
On Jan 26, 2009, at 4:07 PMPST, Bill Wendling wrote: > There is a problem with Objective-C code where a null string is placed > in the wrong section. If we have this code: > > #include <Foundation/Foundation.h> > void foo() { > NSLog(@""); > } > > The null string is defined like this: > > .const > .lcomm LC,1,0 ## LC > > Causing our linker to go nuts, because it expects anonymous strings to > be in the __cstring section. I came up with the attached patch, which > places the string in t...
2012 Feb 25
0
Speex-with-header-byte and Google ASR
...e_length); speex_bits_reset(&bits_); NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; NSData *dataToSend = [NSData dataWithBytes:encoded_frame_data_ length:frame_length]; NSArray *array = [NSArray arrayWithObjects:dataToSend, [defs objectForKey:@"inLang"], nil]; NSLog(@"WriteToFile -> dataToSend: [%d]", [dataToSend length]); [mAudioStreamer performSelectorOnMainThread:@selector(sendDataToServer:) withObject:array waitUntilDone:YES]; } [pool drain]; } void SpeexRecorder::OpenNextFile() { mFileCount++; NSAutoreleasePool *pool = [[NSAutorelea...
2012 Feb 25
0
Speex-with-header-byte and Google ASR
...e_length); speex_bits_reset(&bits_); NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; NSData *dataToSend = [NSData dataWithBytes:encoded_frame_data_ length:frame_length]; NSArray *array = [NSArray arrayWithObjects:dataToSend, [defs objectForKey:@"inLang"], nil]; NSLog(@"WriteToFile -> dataToSend: [%d]", [dataToSend length]); [mAudioStreamer performSelectorOnMainThread:@selector(sendDataToServer:) withObject:array waitUntilDone:YES]; } [pool drain]; } void SpeexRecorder::OpenNextFile() { mFileCount++; NSAutoreleasePool *pool = [[NSAutoreleas...
2012 Sep 30
0
Speex (in ios) really poor quality (and robotic) sound
...// Initialise status = AudioUnitInitialize(rioUnit); XThrowIfError(status, ""); status = AudioOutputUnitStart(rioUnit); XThrowIfError(status, ""); } catch (CAXException &e) { NSLog(@"CAXException..."); } catch (...) { fprintf(stderr, "An unknown error occurred\n"); } } my speex encode & decode function : #define FRAME_SIZE 160 #define COMP_FRAME_SIZE 62 char* encodeSpeex(spx_int16_t *buffer, UInt32 inSize, int *e...
2009 Oct 19
0
[LLVMdev] Objective-C code in lli
...conceptually hard, but noone has done it yet. -Chris > > Please see below. > > Thanks, > > Eric Brunstad > > #import <Foundation/Foundation.h> > > int main(int argc, char *argv[]) > { > NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; > NSLog(@"test!"); > [pool drain]; > return EXIT_SUCCESS; > } > > cmu-351714:llvm-2.5 ericbrunstad$ /Users/ericbrunstad/Downloads/ > llvm-2.5/Release/bin/lli -force-interpreter=true -stats /Users/ > ericbrunstad/Desktop/test/test.o -load=/System/Library/Frameworks/ >...
2011 Apr 21
1
[LLVMdev] A problem from XCode 4 - help sought tracking it down
...the code below, it reproduces the problem: template <typename I0,typename I1> void (^ cc(void (^f)(I0,I1), I0 i0))(I1) { ^ void (I1 i1) { }; } int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; cc(^ void (NSString * a, id b) { NSLog(a, b); }, @"%@"); [pool drain]; } Thanks, Matt
2009 Jan 27
2
[LLVMdev] RFC: -fwritable-strings Change
...wrote: > > On Jan 26, 2009, at 4:07 PMPST, Bill Wendling wrote: > >> There is a problem with Objective-C code where a null string is placed >> in the wrong section. If we have this code: >> >> #include <Foundation/Foundation.h> >> void foo() { >> NSLog(@""); >> } >> >> The null string is defined like this: >> >> .const >> .lcomm LC,1,0 ## LC >> >> Causing our linker to go nuts, because it expects anonymous strings to >> be in the __cstring section. I came up w...
2009 Oct 19
1
[LLVMdev] Objective-C code in lli
...> >> >> Please see below. >> >> Thanks, >> >> Eric Brunstad >> >> #import <Foundation/Foundation.h> >> >> int main(int argc, char *argv[]) >> { >> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >> NSLog(@"test!"); >> [pool drain]; >> return EXIT_SUCCESS; >> } >> >> cmu-351714:llvm-2.5 ericbrunstad$ /Users/ericbrunstad/Downloads/ >> llvm-2.5/Release/bin/lli -force-interpreter=true -stats /Users/ >> ericbrunstad/Desktop/test/test.o -load=/Syst...
2007 Jul 19
2
[LLVMdev] Trouble Resolving Objective-C Symbols in lli
...n lli. It seems that the code will compile and run using llc, however fails to work in lli. SimpleFoundation.m: ---- #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // insert code here... NSLog(@"Hello, World!"); [pool release]; return 0; } ---- $ llvm-gcc -c -emit-llvm SimpleFoundation.m -o SimpleFoundation.bc $ llc SimpleFoundation.bc -o SimpleFoundation.s $ gcc /System/Library/Frameworks/Foundation.framework/Foundation SimpleFoundation.s -o SimpleFoundation.exe $ ./...
2016 Sep 26
4
objc object file generated for gnustep runtime for ELF target is too big
...ps://github.com/gnustep/libobjc2) and Cocotron/Chameleon. For following source file #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> int main(void) {         NSString *str = [NSString stringWithCString:"TEST"];         NSLog(@"test object %@", str);         return 0; } Compilation in xcode's clang xcrun -sdk iphoneos clang -arch armv7s -mios-version-min=6.1 -c test_foundation.m -o test_foundation_apple.o gives following result: 1. object file has only 3156 bytes size 2. and in...
2007 Jan 23
2
[LLVMdev] Semi-random crashes seemingly related to Arguments
...eturn statement. It is obviously totally useless and should have no effect whatsoever. However, without it I will crash sometime later, either when creating a CallInst that uses the Argument in question or when actually generating code for the CallInst slightly later. (I used to have an NSLog() there that had the same effect, but my hunch was that it was just malloc() activity, not anything to do with the I/O taking place. The code is mostly ripped from the examples, but I couldn't find any uses where the Argument obtained survives beyond the scope of the local function. T...
2011 Jun 20
3
[LLVMdev] C struct as function argument
...r LLVM's C++ API to use from Objective-C for a scripting language I'm working on. I currently have an issue with passing arguments to a function that takes a struct argument. typedef struct _test_struct { int x; int y; } test_struct; id testLLVMStructFuncCall(test_struct x) { NSLog(@"%d %d",x.x,x.y); return N(x.x + x.y); } -(void) testLLVMStructFuncCall { CGKModule* myMod = [CGKModule moduleWithName:@"llvm_structfunccall_test"]; CGKType* testStructType = [CGKType structTypeWithElementTypes:[NSArray arrayWithObjects:[CGKType intTypeWith32Bits],...
2010 Aug 12
0
[LLVMdev] LLVM-C: Calling functions contained in other libraries
On Aug 12, 2010, at 10:43 AM, F van der Meeren wrote: > Where am I going wrong here? > Did you link against the library that contains the function? -eric
2013 Jul 22
0
[LLVMdev] Libclang get class name from DeclRefExpr
...clang_getCursorDisplayName(clang_getCursorSemanticParent(clang_getCursorReferenced(cursor))))]; } else { if (memberName) { NSString* param = [NSString stringWithUTF8String:clang_getCString(clang_getCursorDisplayName(cursor))]; NSLog(@"[(%@).%@ %@%@]", ownerClassName, memberName, methodName, param); clang_visitChildrenWithBlock(cursor, ^enum CXChildVisitResult(CXCursor cursor, CXCursor parent) { // test if ([param isEqualToString:@"helpme...
2010 Aug 12
3
[LLVMdev] LLVM-C: Calling functions contained in other libraries
Hello, I have a question concerning llvm-c. I have set up a function that needs to invoke an external method, in a other library. It has the following signature: void* NSFullUserName(void); The void* can be replaced with a i8*, that far I was able to get, but when my call is invoked, the engine gives me the following message: LLVM ERROR: Tried to execute an unknown external function: i8* ()*