audio/sysvad/APO/KWSApo/KWSApoEfx.cpp
STDMETHODIMP CKWSApoEFX::LockForProcess(UINT32 u32NumInputConnections,
    APO_CONNECTION_DESCRIPTOR** ppInputConnections,  
    UINT32 u32NumOutputConnections, APO_CONNECTION_DESCRIPTOR** ppOutputConnections)
{
    ASSERT_NONREALTIME();
    HRESULT hr = S_OK;

    UNCOMPRESSEDAUDIOFORMAT  uncompAudioFormat;

    // fill in the samples per frame for the output (since APO_FLAG_SAMPLESPERFRAME_MUST_MATCH is not selected)
    // There are two potentially different samples per frame values here. The input, which will be interleaved + primary. 
    // And the output, which is just the primary. Because this is used for clearing the zeroing the output buffer, we're going
    // to fill it in with the output samples per frame. ProcessBuffer has both.
    hr = ppOutputConnections[0]->pFormat->GetUncompressedAudioFormat(&uncompAudioFormat);
    IF_FAILED_JUMP(hr, Exit);

    m_u32SamplesPerFrame = uncompAudioFormat.dwSamplesPerFrame;

    hr = CBaseAudioProcessingObject::LockForProcess(u32NumInputConnections,
        ppInputConnections, u32NumOutputConnections, ppOutputConnections);
    IF_FAILED_JUMP(hr, Exit);
    
Exit:
    return hr;
}
//-------------------------------------------------------------------------
// Description:
//
//  Verifies that the APO is ready to process and locks its state if so.
//
// Parameters:
//
//      u32NumInputConnections - [in] number of input connections attached to this APO
//      ppInputConnections - [in] connection descriptor of each input connection attached to this APO
//      u32NumOutputConnections - [in] number of output connections attached to this APO
//      ppOutputConnections - [in] connection descriptor of each output connection attached to this APO
//
// Return values:
//
//      S_OK                                Object is locked and ready to process.
//      E_POINTER                           Invalid pointer passed to function.
//      APOERR_INVALID_CONNECTION_FORMAT    Invalid connection format.
//      APOERR_NUM_CONNECTIONS_INVALID      Number of input or output connections is not valid on
//                                          this APO.

Verifies that the APO is ready to process and locks its state if so.



[in] number of input connections attached to this APO
ppInputConnections - [in] connection descriptor of each input connection attached to this APO
u32NumOutputConnections - [in] number of output connections attached to this APO
ppOutputConnections - [in] connection descriptor of each output connection attached to this APO

Return values.

S_OK                                Object is locked and ready to process.
E_POINTER                           Invalid pointer passed to function.
APOERR_INVALID_CONNECTION_FORMAT    Invalid connection format.
APOERR_NUM_CONNECTIONS_INVALID      Number of input or output connections is not valid on
this APO.
Verifies that the APO is ready to process and locks its state if so . [ in ] number of input connections attached to this APO ppInputConnections - [ in ] connection descriptor of each input connection attached to this APO u32NumOutputConnections - [ in ] number of output connections attached to this APO ppOutputConnections - [ in ] connection descriptor of each output connection attached to this APO Return values . S_OK Object is locked and ready to process . E_POINTER Invalid pointer passed to function . APOERR_INVALID_CONNECTION_FORMAT Invalid connection format . APOERR_NUM_CONNECTIONS_INVALID Number of input or output connections is not valid on this APO .
STDMETHODIMP CKWSApoEFX::LockForProcess(UINT32 u32NumInputConnections,
    APO_CONNECTION_DESCRIPTOR** ppInputConnections,  
    UINT32 u32NumOutputConnections, APO_CONNECTION_DESCRIPTOR** ppOutputConnections)
{
    ASSERT_NONREALTIME();
    HRESULT hr = S_OK;
    UNCOMPRESSEDAUDIOFORMAT  uncompAudioFormat;
    hr = ppOutputConnections[0]->pFormat->GetUncompressedAudioFormat(&uncompAudioFormat);
    IF_FAILED_JUMP(hr, Exit);
    m_u32SamplesPerFrame = uncompAudioFormat.dwSamplesPerFrame;
    hr = CBaseAudioProcessingObject::LockForProcess(u32NumInputConnections,
        ppInputConnections, u32NumOutputConnections, ppOutputConnections);
    IF_FAILED_JUMP(hr, Exit);
Exit:
    return hr;
}
STDMETHODIMP CKWSApoEFX :: LockForProcess ( UINT32 u32NumInputConnections , APO_CONNECTION_DESCRIPTOR * * ppInputConnections , UINT32 u32NumOutputConnections , APO_CONNECTION_DESCRIPTOR * * ppOutputConnections ) { ASSERT_NONREALTIME ( ) ; HRESULT hr = S_OK ; UNCOMPRESSEDAUDIOFORMAT uncompAudioFormat ; hr = ppOutputConnections [ 0 ] -> pFormat -> GetUncompressedAudioFormat ( & uncompAudioFormat ) ; IF_FAILED_JUMP ( hr , Exit ) ; m_u32SamplesPerFrame = uncompAudioFormat . dwSamplesPerFrame ; hr = CBaseAudioProcessingObject :: LockForProcess ( u32NumInputConnections , ppInputConnections , u32NumOutputConnections , ppOutputConnections ) ; IF_FAILED_JUMP ( hr , Exit ) ; Exit : return hr ; }
Description:
Verifies that the APO is ready to process and locks its state if so.
Description : Verifies that the APO is ready to process and locks its state if so .
// fill in the samples per frame for the output (since APO_FLAG_SAMPLESPERFRAME_MUST_MATCH is not selected)
 // There are two potentially different samples per frame values here. The input, which will be interleaved + primary. 
 // And the output, which is just the primary. Because this is used for clearing the zeroing the output buffer, we're going
 // to fill it in with the output samples per frame. ProcessBuffer has both.
