I just discovered a fix to a silly problem that I want to share. I also want to know why it happens in the first place.
I have a new Lenovo desktop running a fresh install of Windows 10 and newly downloaded iTunes. The computer is essentially a music server connected to my home theater / home audio system. The audio is transferred digitally from the PC to the audio system
via a Displayport-to-HDMI connection.
This setup was working fine except that iTunes would mysteriously stop after a few minutes. I wasn't sitting at the computer when this happens. After a bunch of trial and error, I figured out the problem. In Windows 10, the display was set to go to sleep
after 5 minutes. Not the whole computer, just the display, and while plugged in. On a desktop, this is silly, but that's the way it was. It turns out that when the display went to sleep, iTunes would just stop playing. It didn't crash, it just stopped.
The only fix was to stop and restart iTunes.
My fix of course is to tell Windows not to put the display to sleep. This wastes power, but iTunes is happy. Why does iTunes stop when the display goes to sleep?
I can also force this to happen another way. If I turn on another speaker zone in the home theater receiver, iTunes stops. This other zone is recognized by Windows as a separate audio playback device, and it will play through both zones. But it I switch
one of the zones on or off, iTunes stalls. Perhaps this is a clue.