Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Playing gsm phone call

$
0
0

A little off-topic.

Sometimes I got exception  when I try to start playign incoming voice

Unhandled exception: InvalidHandle calling waveOutPrepareHeader    
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)   
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

 

This is very hard to repeat because it comes randomly.

Code is something like : modem sents serial port data "call ready" in my serial port eventhandler I initalize the waveoutevent and that recorder and start playing ( code above ).

I tried to create the waveout device only once not every time I start a new call but in after a sometime the waveout doesn't play nothing or the voice is almost silence.Creating a new waveoutevent instance fix this.


Viewing all articles
Browse latest Browse all 5831

Trending Articles