I wish to change audio tempo or pitch independently. I tried PlaybackSpeedFactor but it changes both at the same time. Also I've tried to use custom audio effect and manually resample the audio, but unfortunately the only example available written on C#, but I'm using C++ CX and stuck with following code (translated from this C# code):
PropertySet^ echoProperties = ref new PropertySet();
echoProperties->Insert("Mix", 0.5f);
String^ effectName = AudioEchoEffect::typeid->ToString();
AudioEffectDefinition^ echoEffectDefinition = ref new AudioEffectDefinition(effectName, echoProperties);
_fileInputNode->EffectDefinitions->Append(echoEffectDefinition);
I got Exception from 0x80040154: Class not registered
, I have not idea what i'm doing wrong. By the way I tried UWP MediaPlayer class before, and, what a miracle, setting PlaybackRate
property doesn't affect pitch there, only rate, so it's like I missed something, since AudioGraph
seems a bit more low level than MediaPlayer
, there should be an easy way to control pitch or tempo in separate way.
So the main question is, how can I change AudioGraph tempo without affecting the pitch (or vice versa)? (it would nice to see examples with C++/CX but C# would be nice too)
User contributions licensed under CC BY-SA 3.0