Ram
Guest
|
Posted:
Sat Oct 16, 2004 5:20 pm Post subject:
GetAudioLevel causes "Invalid Floating Point" WM Encoder 7.1 |
|
|
Hi,
I am using Windows Media Encoder 7.1 SDK. When I used the function
IWMEncoder::GetAudioLevel I got "Invalid Floating Point" error. Can
anyone let me know what can be the cause for this. Here is the
clipping of the code that I am using... more I have a DLL in VC++ in
which I have written code and UI is in Delphi. In VC++ there is only
one thread (spacifying it in case it matters)
In Delphi I am using a timer of 1 second from which I am calling this
function of my own VC++ DLL
void _stdcall GetRecordLevel(double *pLeftAvg, double *pRightAvg)
{
HRESULT hr;
long duration;
DOUBLE leftMin, leftAvg, leftMax;
DOUBLE rightMin, rightAvg, rightMax;
duration = 200;
hr = pEncoder->GetAudioLevel(WMENC_AUDIOLEVEL_LINEAR, 0,
&duration, &leftMin, &leftAvg, &leftMax,
&rightMin, &rightAvg, &rightMax);
if (hr != S_OK)
{
*pLeft = -1;
*pRight = -1;
return;
}
*pLeft = leftAvg;
*pRight = rightAvg;
}
|
|