|
-
Jan 27th, 2007, 04:50 PM
#1
Thread Starter
Fanatic Member
runs, then stops (VB.NET 2003) [resolved]
Hello,
I was wondering if someone out there could run this code and see if it acts screwy on their machine. On mine, it runs for a very short time, then stops... that is, it keeps running, but stops functioning. This program is a simple VU meter that monitors the sound level from the sound card, so to make it work, you will need to play something and make sure your recording setting on your mixer is set to the appropriate device.
The trouble I'm having is in the clsInputToBuffer2 class, in the waveInProc sub. I have some diagnostic code set up here. First, I just fed in buffers, then read them out assuming they were coming out in the order they were going in. That didn't work, and not knowing how the sound card driver would handle it, I decided to poll the buffers to read back only those that were full. You can see that the code displays in a text box the index of the buffer it reads. On my machine, it reads for a while, then stops, thus entering the second part of the waveInProc sub where it trys to see how many bytes were read. It seems that, for every buffer, it sends back MM_WIM_DATA but the buffer is empty. The sub is called once for each empty buffer, then waveInProc stops being called at all. Funny thing, if you enable the GC.COLLECT line, it runs a bit longer.
Thanks.
Last edited by rickford66; Jan 29th, 2007 at 12:08 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|