I answer my own question: when starting the program, you need to align the stack: sub rsp, 08h, which was not done.
start: sub rsp, 08h invoke mixerGetNumDevs invoke ExitProcess