Print Page | Close Window

Waiting for wave files to finish

Printed From: Way2call Communications
Category: Hi-Phone products
Forum Name: Hi-Phone Maestro
Forum Description: Discussion on the Hi-Phone Maestro features and capabilities
URL: http://www.way2call.com/forum/forum_posts.asp?TID=57
Printed Date: Apr 25 2024 at 9:27am


Topic: Waiting for wave files to finish
Posted By: jch
Subject: Waiting for wave files to finish
Date Posted: Mar 16 2010 at 2:52pm
I first created a C# application to answer incoming calls with the hi_phone desktop usb model. I used thread.sleep to wait for the wave file to finish playing before continuing, cheap solution I know, but only had 4 days to get the product finished. now I have two more days to convert my code to work with the multiline maestro. I have all worked out except the thread.sleep is obviously hanging up the app with multiple calls.
Question is, does anyone have some quick sample code or point me in the right direction as to how to wait for one wave file to finish playing before another starts on the same device?
Thanks in advance.



Replies:
Posted By: doronsh
Date Posted: Mar 16 2010 at 3:51pm
Please review the Hi-Phone multiple devices SDK
Console applications does not have a window, and a window message "pump".

The 'Playback Done' event is triggered (internally in the Hi-Phone DLL) via
a window message.

The solution is to 'pump messages'.
Note: the 'pumping' thread must be the same thread that called
w2cUsbM_InitializeDriver(..)


Posted By: stupid48
Date Posted: Apr 02 2010 at 12:18pm
It would be great if you guys could expand upon your samples in your SDK.  It would be nice to see how to "pump messages" works with your API


Posted By: doronsh
Date Posted: Apr 02 2010 at 12:36pm

Pump Messages project is available. Please send an email to mailto:support@way2call.com - support@way2call.com , and we’ll send you the project.




Print Page | Close Window