WDM-KS is broken on Windows 10 via VMware
I tried pip install sounddevice then importing it, on 64 bit windows with 64 bit python - and it wasn't happy..
C:\Users\stu\Desktop\planar>python
Python 2.7.10rc1 (default, May 10 2015, 18:50:04) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sounddevice
Assertion failed!
Program: C:\Python27\python.exe
File: src/hostapi/wdmks/pa_win_wdmks.c, Line 1035
Expression: FALSE
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Hmmm, I have no idea what's going wrong here ... but that may be because I have no clue about Windows and its sound architectures at all.
I've just tried it on Windows 7 64bit and I didn't experience the crash:
C:\Users\ilovewindows>python
Python 3.3.2 |Continuum Analytics, Inc.| (default, May 17 2013, 11:32:27) [MSC v
.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sounddevice
>>>
Does anyone else get the assertion error?
Realised I should have specified that this is Win10 .. it should be sufficient to try in one of the trial win VMs that ms provide for testing, like those on dev.modern.ie.
Doh - silly me - I am on python 2.7.10 - you are testing 3.3.2
I didn't think that the Python version matters, because the error is directly in the PortAudio library.
.. it should be sufficient to try in one of the trial win VMs that ms provide for testing, like those on dev.modern.ie
Thanks for the hint, I didn't know they offer such images, that's quite useful.
However, I don't get my audio device recognized in the virtual machine (using VirtualBox, where I did activate the audio device), it always just shows "No audio devices are installed".
Importing sounddevice works without error, but of course there are no devices available ...
Any idea how I could get the audio device working?
Anyway, if somebody wants to get into this, here's the code with the assert() in question:
static const KSTOPOLOGY_CONNECTION* FindStartConnectionFrom(ULONG startPin, PaWinWdmFilter* filter)
{
unsigned i;
const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);
PA_DEBUG(("FindStartConnectionFrom: Checking %u connections...", filter->connections->Count));
for (i = 0; i < filter->connections->Count; ++i)
{
const KSTOPOLOGY_CONNECTION* pConn = connections + i;
if (pConn->ToNode == KSFILTER_NODE && pConn->ToNodePin == startPin)
{
return pConn;
}
}
assert(FALSE);
return 0;
}
For the full code have a look at https://www.assembla.com/spaces/portaudio/subversion/source/HEAD/portaudio/trunk/src/hostapi/wdmks/pa_win_wdmks.c (but note that the pre-packaged DLL uses older code http://www.portaudio.com/archives/pa_stable_v19_20140130.tgz).
OK, I got it to work, I just changed the "Audio Controller" in the VirtualBox settings from the default "ICH AC97" to "Intel HD Audio".
I just tried it on the virtual machine with Windows 10, it works there, too:
C:\Users\IEUser>python
Python 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> import sounddevice
>>>
I tried only playback (because I currently don't have a mic connected) and it works for MME, DirectSound, WASAPI and WDM-KS. I even installed ASIO4ALL, which plays a strangely distorted sound, so there seems to be another issue ...
Ah, I'm using VMWare - (sound in vbox was wrong in Ableton)..
Yeah - I also had weird sound with Asio4All in vbox - it was playing everything 1/2 speed !
I just tried it on Windows 7 on a real laptop with a real soundcard and a real ASIO driver, where it sounds perfectly fine. So I guess this is an issue with ASIO4ALL and/or virtualization.
But back to your original problem ... Do other PortAudio applications (e.g. Audacity) work on your (virtual?) setup? Since this happens during initialization, I suspect that it's a general problem with PortAudio, there isn't really anything much done in Python at this point ... You could probably try writing a minimal PortAudio application in C and switch on all debugging features to see what's the problem.
Audacity (2.1.1 - 32 bit - installed from chocolatey) seems to open and play an mp3 using the 3 backends - WASAP, Directsound and MMI
I can't find a portaudio dll in audacity, otherwise I'd try swapping it in + see what happens.
So - on python 3.5.0 32 bit (I switched in the meantime).. .I tried swapping in the dll from here
https://code.google.com/p/portaudiosharp/downloads/detail?name=PortAudio.dll
and it doesn't crash when I import sounddevice now..
Those don't seem to support WDM-KS, and your error was there ...
Could you please try those: https://github.com/adfernandes/precompiled-portaudio-windows?
I don't want to disable WDM-KS in the pre-packaged DLLs, because on some (most?) systems it works fine and as I understand it's one of the more professional (i.e. low latency) backends.
OK, copying and renaming portaudio_x86.dll in ReleaseMinDependency first and it seemed to work:
C:\Users\stu\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\_sounddevice_data>python
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:16:59) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sounddevice
before paHostApiInitializers[0].
after paHostApiInitializers[0].
before paHostApiInitializers[1].
PA - PlatformId = 0x2
PA - MajorVersion = 0xa
PA - MinorVersion = 0x0
PA - PlatformId = 0x2
PA - MajorVersion = 0xa
PA - MinorVersion = 0x0
PA - PlatformId = 0x2
PA - MajorVersion = 0xa
PA - MinorVersion = 0x0
PA - PlatformId = 0x2
PA - MajorVersion = 0xa
PA - MinorVersion = 0x0
PA - PlatformId = 0x2
PA - MajorVersion = 0xa
PA - MinorVersion = 0x0
PA - PlatformId = 0x2
PA - MajorVersion = 0xa
PA - MinorVersion = 0x0
after paHostApiInitializers[1].
before paHostApiInitializers[2].
after paHostApiInitializers[2].
before paHostApiInitializers[3].
WASAPI: device idx: 00
WASAPI: ---------------
WASAPI:0| name[Speakers (VMware VMaudio (VMAUDIO) (WDM))]
WASAPI:0| form-factor[1]
WASAPI:0| def.SR[44100] max.CH[2] latency{hi[0.010000] lo[0.010000]}
WASAPI: device idx: 01
WASAPI: ---------------
WASAPI:1| name[Phone Line (VMware VMaudio (VMAUDIO) (WDM))]
WASAPI:1| form-factor[6]
WASAPI:1| def.SR[44100] max.CH[1] latency{hi[0.010000] lo[0.010000]}
WASAPI: device idx: 02
WASAPI: ---------------
WASAPI:2| name[Line In (VMware VMaudio (VMAUDIO) (WDM))]
WASAPI:2| form-factor[2]
WASAPI:2| def.SR[44100] max.CH[2] latency{hi[0.010000] lo[0.010000]}
WASAPI: device idx: 03
WASAPI: ---------------
WASAPI:3| name[Microphone (VMware VMaudio (VMAUDIO) (WDM))]
WASAPI:3| form-factor[4]
WASAPI:3| def.SR[44100] max.CH[1] latency{hi[0.010000] lo[0.010000]}
WASAPI: initialized ok
after paHostApiInitializers[3].
before paHostApiInitializers[4].
Setup called
Enum called
noError = 0
Enum called
noError = 1
Device 1 has render alias
Device 1 has capture alias
Enum called
Interfaces found: 1
Device 1 has render alias
Device 1 has capture alias
Interface 1, Name: V
FilterNew: Creating filter 'VMware VMaudio'
FilterNew: Opening filter...
DumpConnectionsAndNodes: connections=6, nodes=3
Connection: 0 - FromNode=4294967295,FromPin=0 -> ToNode=0,ToPin=1
Connection: 1 - FromNode=0,FromPin=0 -> ToNode=4294967295,ToPin=1
Connection: 2 - FromNode=4294967295,FromPin=3 -> ToNode=1,ToPin=1
Connection: 3 - FromNode=1,FromPin=0 -> ToNode=4294967295,ToPin=2
Connection: 4 - FromNode=4294967295,FromPin=5 -> ToNode=2,ToPin=1
Connection: 5 - FromNode=2,FromPin=0 -> ToNode=4294967295,ToPin=4
Node: 0 - {507AE360-C554-11D0-8A2B-00A0C9255AC1}
Node: 1 - {4D837FE0-C555-11D0-8A2B-00A0C9255AC1}
Node: 2 - {4D837FE0-C555-11D0-8A2B-00A0C9255AC1}
PinNew: Creating pin 0:
PinNew: Checking 7 no of dataranges...
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: Default sample rate = 44100 Hz
PinNew: Finding topology pin...
FindStartConnectionTo: Checking 6 connections...GetConnectedPin: count=3, forward=1, muxPosition=-
GetConnectionTo: Checking 6 connections... (pFrom = 00F09B58)GetConnectionTo: Returning 00F09B68
PinNew: Getting physical connection...
PinNew: Physical connection found!
PinNew: Creating topology filter '\\?\PCI#VEN_1274&DEV_1371&SUBSYS_13711274&REV_02#4&bbf9765&0&208
FilterNew: Creating filter ''
FilterNew: Opening filter...
DumpConnectionsAndNodes: connections=37, nodes=24
Connection: 0 - FromNode=4294967295,FromPin=0 -> ToNode=0,ToPin=1
Connection: 1 - FromNode=0,FromPin=0 -> ToNode=1,ToPin=1
Connection: 2 - FromNode=1,FromPin=0 -> ToNode=23,ToPin=1
Connection: 3 - FromNode=4294967295,FromPin=1 -> ToNode=2,ToPin=1
Connection: 4 - FromNode=2,FromPin=0 -> ToNode=3,ToPin=1
Connection: 5 - FromNode=3,FromPin=0 -> ToNode=23,ToPin=7
Connection: 6 - FromNode=4294967295,FromPin=1 -> ToNode=22,ToPin=1
Connection: 7 - FromNode=22,FromPin=0 -> ToNode=16,ToPin=6
Connection: 8 - FromNode=4294967295,FromPin=2 -> ToNode=4,ToPin=1
Connection: 9 - FromNode=4,FromPin=0 -> ToNode=5,ToPin=1
Connection: 10 - FromNode=5,FromPin=0 -> ToNode=23,ToPin=2
Connection: 11 - FromNode=4294967295,FromPin=2 -> ToNode=17,ToPin=1
Connection: 12 - FromNode=17,FromPin=0 -> ToNode=16,ToPin=1
Connection: 13 - FromNode=4294967295,FromPin=3 -> ToNode=6,ToPin=1
Connection: 14 - FromNode=6,FromPin=0 -> ToNode=7,ToPin=1
Connection: 15 - FromNode=7,FromPin=0 -> ToNode=23,ToPin=3
Connection: 16 - FromNode=4294967295,FromPin=3 -> ToNode=21,ToPin=1
Connection: 17 - FromNode=21,FromPin=0 -> ToNode=16,ToPin=5
Connection: 18 - FromNode=4294967295,FromPin=4 -> ToNode=8,ToPin=1
Connection: 19 - FromNode=8,FromPin=0 -> ToNode=9,ToPin=1
Connection: 20 - FromNode=9,FromPin=0 -> ToNode=23,ToPin=4
Connection: 21 - FromNode=4294967295,FromPin=4 -> ToNode=18,ToPin=1
Connection: 22 - FromNode=18,FromPin=0 -> ToNode=16,ToPin=2
Connection: 23 - FromNode=4294967295,FromPin=5 -> ToNode=10,ToPin=1
Connection: 24 - FromNode=10,FromPin=0 -> ToNode=11,ToPin=1
Connection: 25 - FromNode=11,FromPin=0 -> ToNode=23,ToPin=5
Connection: 26 - FromNode=4294967295,FromPin=5 -> ToNode=19,ToPin=1
Connection: 27 - FromNode=19,FromPin=0 -> ToNode=16,ToPin=3
Connection: 28 - FromNode=4294967295,FromPin=6 -> ToNode=12,ToPin=1
Connection: 29 - FromNode=12,FromPin=0 -> ToNode=13,ToPin=1
Connection: 30 - FromNode=13,FromPin=0 -> ToNode=23,ToPin=6
Connection: 31 - FromNode=4294967295,FromPin=6 -> ToNode=20,ToPin=1
Connection: 32 - FromNode=20,FromPin=0 -> ToNode=16,ToPin=4
Connection: 33 - FromNode=23,FromPin=0 -> ToNode=14,ToPin=1
Connection: 34 - FromNode=14,FromPin=0 -> ToNode=15,ToPin=1
Connection: 35 - FromNode=15,FromPin=0 -> ToNode=4294967295,ToPin=7
Connection: 36 - FromNode=16,FromPin=0 -> ToNode=4294967295,ToPin=9
Node: 0 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 1 - {02B223C0-C557-11D0-8A2B-00A0C9255AC1}
Node: 2 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 3 - {02B223C0-C557-11D0-8A2B-00A0C9255AC1}
Node: 4 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 5 - {02B223C0-C557-11D0-8A2B-00A0C9255AC1}
Node: 6 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 7 - {02B223C0-C557-11D0-8A2B-00A0C9255AC1}
Node: 8 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 9 - {02B223C0-C557-11D0-8A2B-00A0C9255AC1}
Node: 10 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 11 - {02B223C0-C557-11D0-8A2B-00A0C9255AC1}
Node: 12 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 13 - {02B223C0-C557-11D0-8A2B-00A0C9255AC1}
Node: 14 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 15 - {02B223C0-C557-11D0-8A2B-00A0C9255AC1}
Node: 16 - {2CEAF780-C556-11D0-8A2B-00A0C9255AC1}
Node: 17 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 18 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 19 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 20 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 21 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 22 - {3A5ACC00-C557-11D0-8A2B-00A0C9255AC1}
Node: 23 - {DA441A60-C556-11D0-8A2B-00A0C9255AC1}
PinNew: Opening topology filter...PinNew: Checking for output endpoint pin id...
FindStartConnectionTo: Checking 37 connections...GetConnectedPin: count=24, forward=1, muxPosition
GetConnectionTo: Checking 37 connections... (pFrom = 03989FB8)GetConnectionTo: Returning 03989FC8
GetConnectedPin: count=24, forward=1, muxPosition=-1
GetConnectionTo: Checking 37 connections... (pFrom = 03989FC8)GetConnectionTo: Returning 03989FD8
GetConnectedPin: count=24, forward=1, muxPosition=-1
GetConnectionTo: Checking 37 connections... (pFrom = 03989FD8)GetConnectionTo: Returning 0398A1C8
GetConnectedPin: count=24, forward=1, muxPosition=-1
GetConnectionTo: Checking 37 connections... (pFrom = 0398A1C8)GetConnectionTo: Returning 0398A1D8
GetConnectedPin: count=24, forward=1, muxPosition=-1
GetConnectionTo: Checking 37 connections... (pFrom = 0398A1D8)GetConnectionTo: Returning 0398A1E8
PinNew: Found endpoint pin id 7
GetNameFromCategory: USB GUID 0301 -> 'Speakers'
PinNew: Pin name 'Speakers'
PinNew: Releasing topology filter...
Pin created successfully
PinNew: Creating pin 1:
PinNew: Not source/sink
PinNew: Error -9996
PinNew: Creating pin 2:
PinNew: Checking 7 no of dataranges...
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 2
PinNew: Format PCM 8 bit supported
PinNew: Format PCM 16 bit supported
PinNew: Default sample rate = 44100 Hz
PinNew: Finding topology pin...
FindStartConnectionFrom: Checking 6 connections...GetConnectedPin: count=3, forward=0, muxPosition
GetConnectionFrom: Checking 6 connections... (pTo = 00F09B88)
GetConnectionFrom: Returning 00F09B78
PinNew: Getting physical connection...
PinNew: Physical connection found!
PinNew: Opening topology filter...PinNew: Checking for input endpoint pin id (0)...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A028
GetConnectionFrom: Checking 37 connections... (pTo = 0398A028)
GetConnectionFrom: Returning 0398A018
PinNew: Found endpoint pin id 1
PinNew: Checking for input endpoint pin id (1)...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A078
GetConnectionFrom: Checking 37 connections... (pTo = 0398A078)
GetConnectionFrom: Returning 0398A068
PinNew: Found endpoint pin id 2
GetNameFromCategory: USB GUID 0201 -> 'Microphone'
PinNew: Checking for input endpoint pin id (2)...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A0C8
GetConnectionFrom: Checking 37 connections... (pTo = 0398A0C8)
GetConnectionFrom: Returning 0398A0B8
PinNew: Found endpoint pin id 3
GetNameFromCategory: USB GUID 0603 -> 'Line'
PinNew: Checking for input endpoint pin id (3)...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A118
GetConnectionFrom: Checking 37 connections... (pTo = 0398A118)
GetConnectionFrom: Returning 0398A108
PinNew: Found endpoint pin id 4
PinNew: Checking for input endpoint pin id (4)...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A168
GetConnectionFrom: Checking 37 connections... (pTo = 0398A168)
GetConnectionFrom: Returning 0398A158
PinNew: Found endpoint pin id 5
GetNameFromCategory: USB GUID 0601 -> 'Analog'
PinNew: Checking for input endpoint pin id (5)...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A1B8
GetConnectionFrom: Checking 37 connections... (pTo = 0398A1B8)
GetConnectionFrom: Returning 0398A1A8
PinNew: Found endpoint pin id 6
GetNameFromCategory: USB GUID 0601 -> 'Analog'
PinNew: Checking for input endpoint pin id (6)...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 00000000
PinNew: Done with inputs.
PinNew: Setting up 4 inputs
PinNew: Setting up input 0...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A028
GetConnectionFrom: Checking 37 connections... (pTo = 0398A028)
GetConnectionFrom: Returning 0398A018
PinNew: Input (0) friendly name 'Phone Line'
PinNew: Setting up input 1...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A078
GetConnectionFrom: Checking 37 connections... (pTo = 0398A078)
GetConnectionFrom: Returning 0398A068
PinNew: Input (1) friendly name 'Microphone'
PinNew: Setting up input 2...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A0C8
GetConnectionFrom: Checking 37 connections... (pTo = 0398A0C8)
GetConnectionFrom: Returning 0398A0B8
PinNew: Input (2) friendly name 'Line In'
PinNew: Setting up input 3...
FindStartConnectionFrom: Checking 37 connections...GetConnectedPin: count=24, forward=0, muxPositi
GetNumberOfConnectionsTo: Checking 37 connections...GetConnectionFrom: Checking 37 connections...
GetConnectionFrom: Returning 0398A118
GetConnectionFrom: Checking 37 connections... (pTo = 0398A118)
GetConnectionFrom: Returning 0398A108
PinNew: Input (3) friendly name 'CD Audio'
PinNew: Releasing topology filter...
Pin created successfully
PinNew: Creating pin 3:
PinNew: Not source/sink
PinNew: Error -9996
PinNew: Creating pin 4:
PinNew: Checking 4 no of dataranges...
PinNew: DR major format 73647561
PinNew: MaxChannel: 1
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 1
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 1
PinNew: Format PCM 16 bit supported
PinNew: DR major format 73647561
PinNew: MaxChannel: 1
PinNew: Format PCM 16 bit supported
PinNew: Default sample rate = 48000 Hz
PinNew: Finding topology pin...
FindStartConnectionFrom: Checking 6 connections...GetConnectedPin: count=3, forward=0, muxPosition
GetConnectionFrom: Checking 6 connections... (pTo = 00F09BA8)
GetConnectionFrom: Returning 00F09B98
PinNew: Getting physical connection...
PinNew: Physical connection found!
PinNew: Opening topology filter...PinNew: Checking for input endpoint pin id (0)...
FindStartConnectionFrom: Checking 37 connections...PinNew: Done with inputs.
PinNew: Input friendly name 'Input'
PinNew: Releasing topology filter...
Pin created successfully
PinNew: Creating pin 5:
PinNew: Not source/sink
PinNew: Error -9996
Filter (WaveCyclic) created with 3 valid pins (total I/Os: 6)
after paHostApiInitializers[4].
>>>
Trying the version in 'Release' didn't work - do I need more than just the dll ?
C:\Users\stu\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\_sounddevice_data>python
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:16:59) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sounddevice
Traceback (most recent call last):
File "C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\sounddevice.py", line 228, in <module>
_lib = _ffi.dlopen('portaudio')
File "C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cffi\api.py", line 127, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cffi\api.py", line 606, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cffi\api.py", line 594, in _load_backend_lib
raise OSError("library not found: %r" % (name,))
OSError: library not found: 'portaudio'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cffi\api.py", line 595, in _load_backend_lib
return backend.load_library(name, flags)
OSError: cannot load library C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\_sounddevice_data\libportaudio32bit.dll: error 0x7e
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\sounddevice.py", line 239, in <module>
_libname
File "C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cffi\api.py", line 127, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cffi\api.py", line 606, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cffi\api.py", line 601, in _load_backend_lib
return backend.load_library(path, flags)
OSError: cannot load library C:\Users\stu\AppData\Local\Programs\Python\Python35-32\lib\site-packages\_sounddevice_data\libportaudio32bit.dll: error 0x7e
I think "ReleaseMinDependency" is the recommended version, the others might need additional libraries.
Does WDM-KS work in the first case?
I can't really see that in all the debug output ...
Ah, I have no idea if it WDM-KS works on that or not - it seems to have something about WDM, but not WDM-KS..
It didn't crash python on importing sounddevice, which is the most important thing to me. I'll see if I can try some examples that actually do something.
Check out print_devices(), this lists the devices together with their host APIs.
You can also get the same thing with
python -m sounddevice
If WDM-KS is supported, it would be interesting if/how I could change my DLLs in a way that they will work, too.
You only have this error on Windows 10 and only if it runs on VMware, right?
Yup - the title would seem to be accurate now - Windows 10 in VMWare Player (the free one) is the only windows I have right now..
[OT] TBH, I'd convert back to vbox if the sound wasn't so borked in there - it's only so I can try ableton lite with a gizmo I bought... apart from the sound working, it doesn't work super well and slows down my computer :/ [/OT]
Here is the output of print_devices()
0 Microsoft Sound Mapper - Input, MME (2 in, 0 out)
> 1 Microphone (VMware VMaudio (VMA, MME (2 in, 0 out)
2 Phone Line (VMware VMaudio (VMA, MME (2 in, 0 out)
3 Line In (VMware VMaudio (VMAUDI, MME (2 in, 0 out)
4 Microsoft Sound Mapper - Output, MME (0 in, 2 out)
< 5 Speakers (VMware VMaudio (VMAUD, MME (0 in, 2 out)
6 Primary Sound Capture Driver, Windows DirectSound (2 in, 0 out)
7 Microphone (VMware VMaudio (VMAUDIO) (WDM)), Windows DirectSound (2 in, 0 out)
8 Phone Line (VMware VMaudio (VMAUDIO) (WDM)), Windows DirectSound (2 in, 0 out)
9 Line In (VMware VMaudio (VMAUDIO) (WDM)), Windows DirectSound (2 in, 0 out)
10 Primary Sound Driver, Windows DirectSound (0 in, 2 out)
11 Speakers (VMware VMaudio (VMAUDIO) (WDM)), Windows DirectSound (0 in, 2 out)
12 Speakers (VMware VMaudio (VMAUDIO) (WDM)), Windows WASAPI (0 in, 2 out)
13 Phone Line (VMware VMaudio (VMAUDIO) (WDM)), Windows WASAPI (1 in, 0 out)
14 Line In (VMware VMaudio (VMAUDIO) (WDM)), Windows WASAPI (2 in, 0 out)
15 Microphone (VMware VMaudio (VMAUDIO) (WDM)), Windows WASAPI (1 in, 0 out)
16 Speakers (VMware VMaudio), Windows WDM-KS (0 in, 2 out)
17 Phone Line (VMware VMaudio), Windows WDM-KS (2 in, 0 out)
18 Microphone (VMware VMaudio), Windows WDM-KS (2 in, 0 out)
19 Line In (VMware VMaudio), Windows WDM-KS (2 in, 0 out)
20 CD Audio (VMware VMaudio), Windows WDM-KS (2 in, 0 out)
21 Input (VMware VMaudio), Windows WDM-KS (1 in, 0 out)
OK, thanks, so it seems to work.
If you can live with switching to a different DLL, I guess it's fine for this special case.
If you have (or anyone out there has) an idea what I could do the make my DLLs work, too, speak up!
Maybe we can start to narrow the differences. Is there any chance of compiling the same version he has ?
First thing is the version, is there any chance of compiling the version he has (r1891) ?
I know with python modules mixing VS compiled and MingW compiled modules doesn't work, but don't see how it would apply to a DLL on CFFI.