FalkTx

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

FalkTx

Post by j_e_f_f_g »

Don't know who is doing your Windows port, but as I recall you were using a modified rtaudio/rtmidi. And I recall seeing that use Kernel Streaming (KS). KS was never an official audio api, and MS warned that it likely wouldn't work for later OS's. That happened with Vista. For audio on Vista or later, you should use Windows Audio System API (WASAPI). I've written a complete, self-contained, well-commented WASAPI example called PlaySine. It enumerates audio devices, lets you pick one, and plays a sine wave. It should provide all you need to add WASAPI support. It's written in C. I also provided a couple C++ files containing snippets of C++ WASAPI code, if you prefer C++. Comparing the C++ WASAPI code to PlaySine, should tell you what you need to know to adapt the example for C++.

Oh yeah, don't use kernel streaming for MIDI... ever. Rip that code out of rtmidi. Just use midiOutOpen/midiOutShort/etc.

http://wikisend.com/download/468468/wasapi.zip

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

Post Reply