|
From: Julien E. <jey...@gm...> - 2011-02-24 06:22:55
|
Hi, I can confirm that it works here too: the modified example3 plays the chunk twice and my app no longer crashes. Thank you very much. Thanks for the advice too; for now I simply wrap sox in an audio output stream class and the output is only opened once in the constructor. I will study sox.c more closely since I'm only starting with libsox (until now, I was calling sox for playback). Cheers, Julien 2011/2/24 Chris Bagwell <ch...@cn...> > On Wed, Feb 23, 2011 at 11:24 AM, Julien Eychenne <jey...@gm...> > wrote: > > Thanks Pascal. Here is the output from gdb: > > > > Reading symbols for shared libraries .++............ done > > Reading symbols for shared libraries . done > > Reading symbols for shared libraries . done > > Reading symbols for shared libraries . done > > Reading symbols for shared libraries . done > > > > Program received signal EXC_BAD_ACCESS, Could not access memory. > > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008 > > [Switching to process 243] > > 0x00007fff8602a7b7 in pthread_mutex_lock () > > (gdb) bt > > #0 0x00007fff8602a7b7 in pthread_mutex_lock () > > #1 0x0000000100054f25 in PlaybackIOProc (inDevice=<value temporarily > > unavailable, due to optimizations>, inNow=<value temporarily > > unavailable, due to optimizations>, inInputData=<value temporarily > > unavailable, due to optimizations>, inInputTime=<value temporarily > > unavailable, due to optimizations>, outOutputData=<value temporarily > > unavailable, due to optimizations>, inOutputTime=<value temporarily > > unavailable, due to optimizations>, inClientData=0x10010d6c0) at > > coreaudio.c:43 > > #2 0x00007fff8266032d in HP_IOProc::Call () > > #3 0x00007fff826600ff in IOA_Device::CallIOProcs () > > #4 0x00007fff8265ff35 in HP_IOThread::PerformIO () > > #5 0x00007fff8265df44 in HP_IOThread::WorkLoop () > > #6 0x00007fff8265d817 in HP_IOThread::ThreadEntry () > > #7 0x00007fff8265d745 in CAPThread::Entry () > > #8 0x00007fff8605e536 in _pthread_start () > > #9 0x00007fff8605e3e9 in thread_start () > > > > Hopefully this will help. > > Julien > > > > I was able to reproduce this although it just locked up on my app > instead of crashing. > > I added logic to free all OS resources on close and can now run > back-to-back calls. > > Try updating from cvs and give it another go. > > Chris > -- "And please don't cook me, kind sirs! I am a good cook myself, and cook better than I cook, if you see what I mean." The Hobbit, J.R.R. Tolkien |