Hi all
I'm on VS2010, and have the following code:
const bool bStereo = (m_uNbChannels == 2); const bool b51Srnd = (m_uNbChannels == 6); ScopedPointer<float*> ptrProcBuffer = new float*[m_uNbChannels]; m_AnalyzeFilter.ProcessBlock(bStereo? ptrProcBuffer : nullptr, b51Srnd? ptrProcBuffer : nullptr, kBlockLength);
with
bool ProcessBlock(float** const ppfStereoData, float** const ppf51SrndData, const unsigned int uBlockSize);
Well, when calling the processBlock function I would expect the scopedpointer to call its float** cast operator then the .get() method to be called, nothing else.
But instead, a new ScopedPointer object is constructed from the existing one, and then the original one is reset...
why?
my only workaround so far is to call the .get() method explicitly like:
m_AnalyzeFilter.ProcessBlock(bStereo? ptrProcBuffer.get() : nullptr, b51Srnd? ptrProcBuffer.get() : nullptr, kBlockLength);
Thanks for advise