Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / June 2004

Tip: Looking for answers? Try searching our database.

SAPI 5.1 Audio Event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian Long - 01 Jun 2004 12:27 GMT
Hi,

I'm doing some COM Interop against SAPI 5.1 using an Interop Assembly.

Many simple things are working fine - the Word & Sentence events fire well.

However the Audio event does not fire at all meaning I can't add a VU meter

I have specified the required event in the EventInterests property (and also
tried requesting all events).

It works fine from raw COM without .NET

Anyone know anything about this?

Thanks!

- Brian Long
"Ying-Shen Yu[MSFT]" - 02 Jun 2004 05:50 GMT
Hi Brian,

Did you set the EventInterests before adding the event handler?
If so, probably this is the cause, after some debugging, I found the COM
object SpVoice will reset EventInterests property when there is an event
added, and the AudioLevel event is by default not be notified.

To workaround this problem, you may set the EventInterests property to
include the SVEAudioLevel event after adding all the event handlers.

Does ie resolve your problem?
Please feel free to reply this thread if you still have problem on this
issue, and it would be helpful if you could make a simple sample to
reproduce this problem, so that we can have a better understanding about
the actual scenario in your program.

Thanks!
Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
Brian Long - 02 Jun 2004 09:59 GMT
> Hi Brian,

Hello

> Did you set the EventInterests before adding the event handler?

Er. Yes I did

> If so, probably this is the cause, after some debugging, I found the COM
> object SpVoice will reset EventInterests property when there is an event
> added, and the AudioLevel event is by default not be notified.
>
> To workaround this problem, you may set the EventInterests property to
> include the SVEAudioLevel event after adding all the event handlers.

Beautiful. That's had me stumped for ages. Thanks for that

> Does ie resolve your problem?

Yes indeed

- Brian Long

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.