[wdmaudiodev] Re: waveInAddBuffer and Win2k, XP

  • From: Paal Tamas <paal_to@xxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 29 Jul 2004 10:12:04 +0200 (CEST)

Thank you Harry!

I've made the necessary changes (changed the device handling 
mechanism from callback function to message handling in a new 
thread), and now it works fine under Win98 and XP, but under Win2000 
I still have the same exception then before.

Please advise.
Tom

Harry Graham <harry_graham@xxxxxxxxxx> írta:

> Check the "waveInProc" doc in the SDK:
> 
> "Applications should not call any system-defined functions from inside 
a
> callback function, except for EnterCriticalSection, LeaveCriticalSection,
> midiOutLongMsg, midiOutShortMsg, OutputDebugString, PostMessage,
> PostThreadMessage, SetEvent, timeGetSystemTime, timeGetTime, 
timeKillEvent,
> and timeSetEvent. Calling other wave functions will cause deadlock."
> 
> You cannot call waveInAddBuffer from the callback.
> 
> Harry
> 
> 
> -----Original Message-----
> From: Paal Tamas [mailto:paal_to@xxxxxxxxxxx] 
> Sent: Wednesday, July 28, 2004 6:31 AM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] waveInAddBuffer and Win2k, XP
> 
> 
> 
> Hi,
> 
> I've developed an application that reads data from my USB 
soundcard, 
> and writes to the same card at the same time. The app works fine 
> under Win98SE.
> When I tried it under win2K, it raised an exception (access violation in 
> wdmaud.drv). After a short debugging, I realized, that the 
> waveInAddBuffer() API function call raises that exception. 
> 
> Have you ever faced this kind of problem? What am I missing?
> 
> The application simply opens the input and the output with the 
> respective waveInOpen() and waveOutOpen() functions. I use 
Callback 
> functions to handle the data. I use only standard windows APIs.
> The waveInAddBuffer() function is called inside the callback function 
> (under the WIM_OPEN section).
> 
> Thank you for your help in advance.
> Tom
> ******************
> 
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?
subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?
subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
> 
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.de/
> ******************
> 
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?
subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?
subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
> 
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.de/
> 
> 


******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: