I forgot to mention that IDirectMusicPerformance is a high level API and needs to call down to lower level APIs. The temptation is to implement stuff directly in IDirectMusicPerformance as that is what applications call. But applications can and do mix and match IDirectMusicPerformance with lower level APIs.
The implementation in `dmime: Implement MusicToReferenceTime and ReferenceToMusicTime.` feels wrong: - Magic value 6510 - DMUS_E_NO_MASTER_CLOCK as error if dmusic pointer is missing
This feels like that should call down to a lower level API and eventually to the SynthSink methods SampleToRefTime / RefTimeToSample. I don't see a path down there though.\ Maybe calculated based on values it gets from the port via IKsControl::KsProperty? http://doc.51windows.net/directx9_sdk/htm/ksproperty.htm%5C Or maybe by comparing the latency clock to the master clock? https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/clock-synch...
I'm fine to have this go in as is but the magic value "6510" needs at least a comment on were that comes from.