Good report Frank.<div><br clear="all">73,<div>Bob, N6TV</div><br><div class="gmail_quote">On Tue, Sep 25, 2012 at 1:44 PM, dl2alf <span dir="ltr"><<a href="mailto:dl2alf@arcor.de" target="_blank">dl2alf@arcor.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Our contest crew is running several portable configurations of Win-Test<br>
together with USB sound cards for recording RX audio (V4.7.0 + Microkeyer +<br>
USB sound cards).<br>
Configuration of the contest recorder within Win-Test is proved, most of the<br>
24 contest hours everything is running fine.<br>
For some reason the connection to the USB sound card is lost for a moment.<br>
This might be caused by EMI, driver problems or if someone diconnects the<br>
USB cable by mistake.<br>
If that happens you will get the following behavior:<br>
<br>
- recording stops without error message (neither from Win-Test nor from<br>
operating system)<br>
- the MP3 output file is not written anymore<br>
- beside recording, Win-Test is fully operational that time, so this might<br>
be unnoticed for a long time (you will loose hours of RX recordings that<br>
way!)<br>
- the situation won't change if the USB sound card is back again<br>
- if you try to stop capturing, Win-Test hangs and must be closed via Task<br>
Manager<br>
<br>
To reproduce this just do the following:<br>
<br>
- connect an USB sound card to your PC (can be a Microkeyer internal USB<br>
sound card as well)<br>
- start Win-Test<br>
- open contest recorder window and go to the MP3 configuration menu<br>
- set the recording sound device to that USB sound card input, don't care<br>
about the other options<br>
- start recording<br>
- disconnect the USB sound card while recording<br>
- (optional: connect the USB sound card again)<br>
- try to stop recording<br>
<br>
--> Win-Test hangs as a result<br>
<br>
I did some investigations to find out what's going on there. For that, I was<br>
writing some software for audio capturing based on C# and .NET and using<br>
Microsoft DirectSound and Lame as an audio compressor. ( it's just a "proof<br>
of concept", the source code is available on request). I guess that this is<br>
basically the same idea as used in Win-Test.<br>
Here is what I could find out so far:<br>
<br>
- the above mentioned behavior is NOT depending on the operating system<br>
(tested on WinXP and Win7)<br>
- the above mentioned bevavior is NOT depending on Win-Test version (tested<br>
up to V4.7.0)<br>
- it seems, that the Microsoft DirectSound subsystem simply stops working,<br>
when the USB sound card is disconnected --> you won't get any software<br>
exception as a notification<br>
- any thread in the software layers above consuming kind of "Audio data<br>
available" event just hangs in an infinite loop<br>
- while trying to stop audio capture, a software exception is generated<br>
called "NoDriverException" (which is too late and is probably not handled by<br>
Win-Test)<br>
<br>
To aivod this and to get a more robust software, I'd suggest the following<br>
improvements in Win-Test:<br>
<br>
- periodically check the increasing length of the MP3 output file while<br>
recording<br>
- if the length is not increasing anymore, something is wrong with the audio<br>
source (it might be lost or disconnected), so do:<br>
- stop recording asynchronously and handle the upcoming "NoDriverException"<br>
properly<br>
- periodically check for the previosly selected audio device is present<br>
again, if yes:<br>
- resume recording<br>
<br>
<br>
I'd like to know if somebody else has experienced the same and likes to get<br>
into a discussion on that topic. Any answer is highly appreciated.<br>
<br>
Best regards,<br>
<br>
Frank, DL2ALF@DL0GTH<br>
<br>
_______________________________________________<br>
Support mailing list<br>
<a href="mailto:support@win-test.com">support@win-test.com</a><br>
<a href="http://lists.f5mzn.org/cgi-bin/mailman/listinfo/support" target="_blank">http://lists.f5mzn.org/cgi-bin/mailman/listinfo/support</a><br>
</blockquote></div><br></div>