Page 1 of 1

Question about TAudioRedirector(1.85)

PostPosted: December 4th, 2007, 2:52 pm
by john123
Hi,
in "unit WaveRedirector"
I have a question,
Is this correct?
Code: Select all
function TAudioRedirector.GetActive: Boolean;
begin
  Result := AudioIn.Active or AudioIn.Active;
end;

Other question:
sometimes, while Async = True after terminate program i receive follow error: EWaveAudioInvalidOperation "Device is aleardy close"
i guess problem is in "InternalClose" or on "destroy"
thanks for answer.
best regard

PostPosted: December 5th, 2007, 12:15 am
by Kambiz
It is wrong! Please correct it:

Code: Select all
function TAudioRedirector.GetActive: Boolean;
begin
  Result := AudioIn.Active or AudioOut.Active;
end;


Thank you!

PostPosted: December 5th, 2007, 10:55 am
by john123
What about second question?

PostPosted: December 5th, 2007, 10:07 pm
by Kambiz
I have no idea. Sorry, I'm too busy nowadays. I'll look it later.

But in my tests I have never seen this problem. If you are using threaded mode, be sure your event handlers are thread safe. Also, before shutting down the application, on OnClose event of the form, close the active devices.

PostPosted: December 24th, 2007, 1:26 pm
by john123
Hi, Mr Kambiz
Could you take a look at the second question again? (also my code is thread safe).
thanks.

PostPosted: December 24th, 2007, 3:07 pm
by Kambiz
Without having the code I cannot help, sorry.