Daniel Tihelka | 25 May 2012 11:23
Picon

libSOX as stream processor

Hallo,
I am trying to use libSox in my application which processes streamed
data. The processing will not be covered by SOX only, there are some
other modules applied to the signal.

The question is, how to use libSox in such a way that it repeatedly
accepts a chunk of data, applying the effect to them and returning the
processed data back.

I have tried the following sequence (schematic):

Initialization:
sox_create_effect("an effect")
sox_open_mem_write()
sox_create_effect("output")

Loop:

sox_seek(m_pOutFormat, 0, 0); // move to the beginning of the out buffer
sox_write(....)
// read data from the buffer
goto Loop;

Unfortunatelly, sox_seek() seems not to work on the memory buffer ...
Also using sox_open_memstream_write() instead flushes the data after
sox_close() is called.

So, Is there a way of getting the output data in each loop?

Thank you very much,
Dan T.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Gmane