GetAudioLevel causes "Invalid Floating Point" WM Encoder 7.1
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
GetAudioLevel causes "Invalid Floating Point" WM Encoder 7.1

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK
Author Message
Ram
Guest





Posted: Sat Oct 16, 2004 5:20 pm    Post subject: GetAudioLevel causes "Invalid Floating Point" WM Encoder 7.1 Reply with quote

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;
}

Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB