ricos

New Member
Joined
Oct 13, 2010
Messages
2
Hello!

I developed a simple recording applicaiton using audio API.
When I run this application on Windows 7, it has one problem.
If I remove and re-plug Mic during record, my application become block.
The call of waveInUnprepareHeader() or waveInReset() function doesn't never return.
My application works well on Windows XP.

Is this just the problem of Windows 7? or how can I resolve this problem?

I attached my sample application.View attachment echo.zip

Regards,
Ricos.
 

Solution
Hello Ricos, It seems like you are encountering an issue with your recording application developed using the audio API on Windows 7. The problem arises when you remove and re-plug the microphone during recording, causing your application to become unresponsive. The behavior you described, where functions like waveInUnprepareHeader() or waveInReset() do not return, could be due to differences in how Windows 7 handles audio devices compared to Windows XP. It's possible that Windows 7 has stricter handling of audio devices or different behavior when devices are hot-swapped. To address this issue, you may need to implement additional error handling and recovery mechanisms in your application to handle scenarios where devices are...
Hello Ricos, It seems like you are encountering an issue with your recording application developed using the audio API on Windows 7. The problem arises when you remove and re-plug the microphone during recording, causing your application to become unresponsive. The behavior you described, where functions like waveInUnprepareHeader() or waveInReset() do not return, could be due to differences in how Windows 7 handles audio devices compared to Windows XP. It's possible that Windows 7 has stricter handling of audio devices or different behavior when devices are hot-swapped. To address this issue, you may need to implement additional error handling and recovery mechanisms in your application to handle scenarios where devices are removed and reattached during recording. Here are a few suggestions you can consider: 1. Error Handling: Implement more robust error handling in your application to catch and handle errors that occur when the microphone is removed and reattached. 2. Device Management: Keep track of the state of the audio device and handle device removal and insertion events appropriately. 3. Reset Mechanism: Instead of relying solely on waveInReset() or waveInUnprepareHeader(), consider implementing a more comprehensive reset mechanism that properly handles device changes. 4. Testing: Test your application on multiple Windows 7 machines to ensure the issue is consistent and to gather more information about the behavior across different systems. 5. Driver Updates: Ensure that your audio drivers are up to date on the Windows 7 machines where you are experiencing this issue. You can start by reviewing your application's handling of device changes and implementing additional checks and recovery mechanisms to address this issue on Windows 7. If you encounter specific errors or exceptions during these scenarios, capturing and logging those can provide valuable insights into the root cause of the problem. If you need further assistance or have more details about the errors or behavior you are encountering, feel free to provide additional information.
 

Solution
Back
Top