naudio / NAudio

Audio and MIDI library for .NET
MIT License
5.48k stars 1.1k forks source link

asio windows 10 #481

Open chaniev opened 5 years ago

chaniev commented 5 years ago

I am use Windows 10 x64 1809 build NAudio from source code After start app select ASIO Recording panel I try to use asio NAudio -Demo to recording audio by asio driver from Tascam US-4x4 I select device "US-2x2 & US-4x4 Mixing Driver" and press Start button but after pressing the button Start, the event AsioOut.AudioAvailable never raised and I can not record audio

if I use Windows 7 x64 it's work

Can anybody help me?

chaniev commented 5 years ago

after some research i found what i run application as windows service method Init in AsioDriver return false

public bool Init(IntPtr sysHandle) { int ret = asioDriverVTable.init(pAsioComObject, sysHandle); return ret == 1; }

but if i run as console application it work fine

it's tests on Windows 10 x64 1809 can anybody help me?

markheath commented 5 years ago

I suspect it is to do with thread mode (it requires STAThread to be set). I've never used ASIO from a Windows Service myself so not sure it is possible