It ends up my initial thoughts of the DMusic loader failing were wrong. The call that fails is when I try to download the music segment to the performance object. When it fails it gives me the useless error code of E_FAIL which isn't even listed in the DX docs as a possible return code. Searching the interwebs comes up empty as well. What's worse is that this behaviour is totally random. Most of the times everything loads fine. It's only about 10-20% of the time that you get a failure.
My next guess is that things are getting into a dirty state so I start checking into my shutdown routines. Sure enough I fine out that the destructors of my derived audio classes aren't getting called because I'm cleaning up using a pointer to the base class without having a virtual destructor. This fix takes all of 5 seconds and all is good! Or so I hoped.
Even with things shutting down correctly now I'm still getting the same failures. So where does this leave me? Generally fuxxored. I honestly don't know why things are failing and can't find any documentation on what could be wrong. Next step is letting my brain stew on things a little more and if I don't come up with anything new I'll be looking at playing wave clips through directsound instead of dmusic. Hopefully I don't have to resort to that cop out but at this point I'm starting to go crazy.