AudioPlayMode.BackgroundLoop stops after about 3 hours - vb.net

This is my first post here. I need some help with my Visual Basic .NET project.
I'm making a program that runs in the background and continously plays an audio file. The project has a 10 second wav file embedded as a resource.
I was able to make it work just fine using this method:
AudioPlayMode.BackgroundLoop()
BackgroundLoop is supposed to play the audio file in the background continuously. It works fine but after about 3 hours, I noticed that it just stops. The program stays open but the audio stops looping. Is this normal? How can I prevent this from happening?
Edit to add workaround:
I couldn't find the reason why it was stopping the playback every 3 hours but I found a workaround.
Basically, I just added a Timer control and just kept stopping and restarting the playback every 2 hours.
My.Computer.Audio.Stop()
My.Computer.Audio.Play(My.Resources.Files.AudioFileName, AudioPlayMode.BackgroundLoop)
It's working fine for now. I'll keep observing the behavior for a few hours and will report back.

Related

How do I delay video from my webcam on my own feed?

Id like to have the ability to delay the video from my webcam on. my own computer. Honestly I am using. it. as a "delayed mirror" for my golf swing. I have always recorded, then stopped, opened up the file and watched then did it again. Doing this 30 times in a session working on my swing is annoying. Id like to just take a webcam, be able to delay the video 5,8,10 seconds so I can watch and just keep moving. what is the easiest way around this. I have been told I could do this with a script but not sure where to start. Can anyone help me or send me in the right direction? Im on a Mac but also have a PC if needed.
Python + OpenCV.
First manage to show a current image from your webcam using tutorials.
Then instead of immediately showing the image you add it at the end of a buffer object, this could be a collections.deque from standard Python.
If you want to delay for say 5 seconds and you're capturing with 30 frames per second, then don't show anything until you add 5*30 images from your camera to the buffer. Now when you filled the buffer as soon as you get another image, you add it to the end of the buffer, but also remove 1 image from the beginning of the buffer and show it.

VB.Net application highlights all files in background when running / getting focus

I have an App that I inherited in VB6 and have ported mostly to VB.net
When I compile / run the app - it highlights all the files in the current selected folder.
What makes it worse, is it's very difficult to search online as what search terms does one use?
The app was ported to VS 2005 - quite successfully - but this has me stumped...
I have tried commenting out all the code that's run on startup and it still does it, so it must be some sort of background thing...
Any ideas?
I can't find an old version of my app to see if it's changes I have made and I don't know where to begin. See the image:
The top part is before I run the app, the bottom is once the app is running and has focus. I hope it makes sense
Also, if I'm browsing and then run the app, and go back to the browser, when my app gets the focus again, the webpage goes back to the top...
The folder is just an example - Basically when I compile (or later run) my App, if I go to Windows Explorer - when the app gets focus - whatever folder I am in has all its files highlighted. If instead of going to Windows Explorer, I go to a web browser, when the app gets focus the browser goes to the top (similar to Home).
There is Windows Integratio, but I have commented out what I can and still am no closer.
Does this info help?
I found the problem - after going back to the vb6 project and removing everything except for the 5 modules needed to startup and I eventually tracked the problem.
There was some code being called when two edit boxes received focus which called send keys home and end - hence it would go home - select all files to the end. I had deactivated one of the edit boxes to not receive focus and it helped temporarily(obviously until the other box got focus), but since deactivating the send keys when they get focus has helped. Albeit an arbitrary problem, maybe it will help someone in the future..

Why is my VB app invisible to the screen recorder?

I have written a VB application in VS2010. When I try to record its operation for a demo video with Windows Media Encoder x64 or Apowersoft free screen recorder, I get a recording of everything on the desktop except my application. It's like the application is invisible to the recorder. It has worked in the past (2 weeks ago). It must be something I have done but I'm baffled. Is there a "feature" in VB that can prevent you from recording the Form?
BTW, a still screen capture works fine and sub forms I bring up are captured. Only the main form is invisible to the recorder.
Thank you for your help and time.
Not a VS or VB problem after all. What I found was that windows 7 was switching me from Aero Theme to Windows 7 Basic. The message that showed up was that I was low on display memory. (A quick pop-up in the bottom right corner that I was ignored during the recording). However, I have 4.75 G of display memory?
BTW on a video conf call it produced the same invisibility "feature" until I found the Theme switch.
I haven't actually fixed anything but now know to watch for the tell tale screen blink as it switches mode. I pause the recording, and switch it back before restarting the recording. Got through the recordings I needed for now. I was using MS Media Encoder. I have now replaced it with Adobe Premier elements but haven't tried it yet to see if I still have the problem. Need to get the "how to" videos out the door first.
Thanks again. I have read many of your Answers to others in the past that have helped me solve numerous other VB and VS problems.
Michael
That's weird since it's recording forms from the application and not other forms (main form) from the same application.
Make sure you run the recorder as administrator and not the application.

Windows Phone SDK 7.1.1 update freezes on Windows 8 Release Preview

I can't get WinPhone 7 SDK update v7.1.1 to install. It freezes my computer everytime I try to install, the mouse still work but after a while whole system locked up and I need to hold power button to turn it off. Looked at task manager and look like it freeze when configure the emulator. Tried several time, even reinstall Windows and still no luck. Anyone know a work around on this? I saw some others faced this problem but no solution.
When it freezes (in particular, when the spinning icon freezes), try hitting Ctrl+Alt+Del once. Two things can happen:
The first is that the machine will completely freeze within a minute or two, which will require a hard reboot.
The second is that the screen will flicker quickly, attempting to show the "Lock/Switch user/Sign out/Change password/Task manager" screen, and then will jump back to the setup screen. You'll then see the progress icon start spinning again, but it will hesitate several more times. It will either freeze the machine again (and if so, do a hard reboot and try again), or setup will eventually complete (which on my machine took no longer than 10 minutes).

AVAudioRecorder freezes when paused too many times before a stop

I have noticed that AVAudioRecorder (iOS) hangs when I pause and resume 8 or more times during the recording. On the simulator it hangs indefinitely, and on the device I get this errors:
AudioQueueStop posting message to kill mediaserverd
Does anyone know how to prevent this, or is there a workaround? My problem is that I try to load the file into AVAudioPlayer afterward and the resulting loaded file has no duration (and doesn't play). The strange thing is that I am able to save the file and later play it just fine. I'm not certain yet at what point the file is playable, but was hoping if there is a solution to the issue with the recorder, I won't need a workaround.
I've got the same same problem and I thought i had found a workaround, it seems to work for small recordings, but it still freezes for longer ones:
[NSThread detachNewThreadSelector:#selector(stop) toTarget:myrecorder withObject:nil]
maybe it can work for you if you're lucky, have you filed a bug report? i'll file one now