C# - Change volume using external Midi controller -
in app use midi-dot-net noteon messages , naudio play audio samples / notes. in naudio i'm using asio implementation lower latency , works perfectly. have problem controlling volume. before used asio engine able controll volume way (some part of code):
private void...() { int newvolume = ((ushort.maxvalue / 50) * trackwave.value); uint newvolumeallchannels = (((uint)newvolume & 0x0000ffff) | ((uint)newvolume << 16)); waveoutsetvolume(intptr.zero, newvolumeallchannels); volumen.text = trackwave.value.tostring(); }
when i'm using asio implementation in naudio it's not working, can mute sounds, can't change volume.
do know how can controll volume use of volume slider placed in external midi controller? somehow works when testing steinberg or synthogy or other audio software producers asio drivers.
thank help.
with asio change volume modifying level of samples send device. there isn't concept of device volume. include volumesampleprovider
or similar in signal chain, , set volume on that
Comments
Post a Comment