added some android test code

This commit is contained in:
Volker Fischer 2014-01-21 20:12:41 +00:00
parent d7a41b5076
commit 1593661c25

View file

@ -110,15 +110,21 @@ CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* ar
&recorder ); &recorder );
// get the audio recorder simple buffer queue interface // get the audio recorder simple buffer queue interface
// TEST
SLresult test =
(*recorderObject)->GetInterface ( recorderObject, (*recorderObject)->GetInterface ( recorderObject,
SL_IID_ANDROIDSIMPLEBUFFERQUEUE, SL_IID_ANDROIDSIMPLEBUFFERQUEUE,
&recorderSimpleBufQueue ); &recorderSimpleBufQueue );
// TEST
if ( test == SL_RESULT_SUCCESS )
{
// register the audio input callback // register the audio input callback
(*recorderSimpleBufQueue)->RegisterCallback ( recorderSimpleBufQueue, (*recorderSimpleBufQueue)->RegisterCallback ( recorderSimpleBufQueue,
processInput, processInput,
this ); this );
}
// TEST
#if 0
// configure the output buffer queue // configure the output buffer queue
SLDataLocator_AndroidSimpleBufferQueue outBufferQueue; SLDataLocator_AndroidSimpleBufferQueue outBufferQueue;
outBufferQueue.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE; outBufferQueue.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE;
@ -169,6 +175,7 @@ CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* ar
(*playerSimpleBufQueue)->RegisterCallback ( playerSimpleBufQueue, (*playerSimpleBufQueue)->RegisterCallback ( playerSimpleBufQueue,
processOutput, processOutput,
this ); this );
#endif
} }
void CSound::CloseOpenSL() void CSound::CloseOpenSL()