Print Page | Close Window

OnAsyncPlaybackDone never fires

Printed From: Way2call Communications
Category: Hi-Phone Software Development Kit (SDK)
Forum Name: Hi-Phone and .NET
Forum Description: Discussion on the Hi-Phone product family, its .NET interface, samples and development tools
URL: http://www.way2call.com/forum/forum_posts.asp?TID=45
Printed Date: Apr 22 2024 at 8:30am


Topic: OnAsyncPlaybackDone never fires
Posted By: andrea
Subject: OnAsyncPlaybackDone never fires
Date Posted: Jan 22 2010 at 10:10am
Hi all...
 
I wrote a simple program using HiPhone Desktop USB able to dial a phone number and play a wave file.
When wave playback finish the program should hang up and terminate but the event OnAsyncPlaybackDone never fires! (tested putting a breakpoint into event handler routine).
 
This is what "Way2Call Log" give me:
 0 15:26:57:679 [1156] » DLL_PROCESS_ATTACH
 1 15:27:01:460 [1156] » InitializeDriver() Called, dwReserved=0, DLL Version: 13700
 2 15:27:01:585 [1156] » Dev#0 Wave Out name 'Hi-Phone Desktop USB'
 3 15:27:01:585 [1156] » Dev#0 Wave In name 'Hi-Phone Desktop USB'
 4 15:27:01:585 [1156] » Dev#0 Wave Aux name 'Hi-Phone Desktop USB Aux'
 5 15:27:01:585 [1156] » Dev#0 Mixer Name 'Hi-Phone Desktop USB'
 6 15:27:02:070 [1156] » InitializeDriver() End OK, Num Devs = 1
 7 15:27:02:070 [1156] » Dev #0 Name: Hi-Phone Desktop USB 018338
 8 15:27:02:070 [1156] » Dev#0 Open Called. DLL: 13700, Fw: 4.03.36, SN: HD00USGR02102731018338
 9 15:27:02:085 [1156] » Dev#0 Event: Device Reset Occured. ExData 0x0000, TID: 0x0A68
 10 15:27:02:117 [1156] » Dev#0 Coutry Code: 39
 11 15:27:02:132 [1156] » Dev#0 Open Completed.
 12 15:27:10:664 [1156] » Dev#0 Monitor Custom Tones called,  1 tone items.
 13 15:27:10:679 [1156] » Dev#0 GetLineWirePlugged called.
 14 15:27:10:679 [1156] » Dev#0 GetLineWirePlugged error: < W2C_DEV_MODEL_LITE.
 15 15:27:10:695 [1156] » Dev#0 Call Started: 48 TID: DB4
 16 15:27:10:695 [1156] » Dev#0 Command: Switch: Line - Audio Stream, Phone Monitor
 17 15:27:10:695 [1156] » Dev#0 Command: Mute Phone
 18 15:27:11:039 [1156] » Dev#0 Command: DTMF Dial 4
 19 15:27:11:226 [1156] » Dev#0 Command: DTMF Dial 8
 20 15:27:11:414 [1156] » Dev#0 Command: Start Analysis
 21 15:27:11:429 [1156] » Dev#0 Opened wave Aux: ID=2, Name=Hi-Phone Desktop USB Aux.
 22 15:27:11:445 [1156] » Dev#0 Event: Call - Dialing done. ExData 0x0000, TID: 0x0DB4
 23 15:27:11:445 [1156] » Dev#0 Call Thread Ended with 0, TID: DB4
 24 15:27:15:226 [1156] » Dev#0 Command: Un-Mute Phone
 25 15:27:15:226 [1156] » Dev#0 Event: Call answered: Voice detected. ExData 0x0000, TID: 0x10D4
 26 15:27:15:226 [1156] » Dev#0 Command: Un-Mute Phone
 27 15:27:15:242 [1156] » Dev#0 Command: Switch: Phone - Audio Stream - Line
 28 15:27:15:242 [1156] » Dev#0 Playback Thread Started
 29 15:27:19:570 [1156] » Dev#0 Event: Call answered: Voice detected. ExData 0x0000, TID: 0x10D4
 30 15:27:22:773 [1156] » Dev#0 Event: Tone Monitored. ExData 0x0000, TID: 0x10D4
 31 15:27:24:242 [1156] » Dev#0 Event: Call answered: Voice detected. ExData 0x0000, TID: 0x10D4
 32 15:27:24:820 [1156] » Dev#0 Event: Call answered: Voice detected. ExData 0x0000, TID: 0x10D4
 33 15:27:26:804 [1156] » Dev#0 Event: Call answered: Speech detected. ExData 0x0000, TID: 0x10D4
 34 15:27:30:773 [1156] » Dev#0 Event: Tone Monitored. ExData 0x0000, TID: 0x10D4
 35 15:27:31:351 [1156] » Dev#0 Event: Call answered: Voice detected. ExData 0x0000, TID: 0x10D4
 36 15:27:35:835 [1156] » Dev#0 Event: Busy detected. ExData 0x0000, TID: 0x10D4
 37 15:27:38:835 [1156] » Dev#0 Event: Busy detected. ExData 0x0000, TID: 0x10D4
 38 15:27:41:835 [1156] » Dev#0 Event: Busy detected. ExData 0x0000, TID: 0x10D4
 39 15:27:44:851 [1156] » Dev#0 Event: Busy detected. ExData 0x0000, TID: 0x10D4
 40 15:27:47:867 [1156] » Dev#0 Event: Busy detected. ExData 0x0000, TID: 0x10D4
 41 15:27:50:867 [1156] » Dev#0 Event: Busy detected. ExData 0x0000, TID: 0x10D4
 42 15:27:53:804 [1156] » Dev#0 Event: Busy detected. ExData 0x0000, TID: 0x10D4
 43 15:27:56:820 [1156] » Dev#0 Event: Busy detected. ExData 0x0000, TID: 0x10D4
 
Any ideas?



Replies:
Posted By: doronsh
Date Posted: Jan 22 2010 at 10:25am
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(..)

We"ll put a note on it in the SDK.



Print Page | Close Window