Reputation: 2713
I wish to play Tones in WPF from a sound card device (not system speaker). Im disappointed to find that apart from playing a beep or a wav file WPF does not have any native way to play simple sound frequencies. ie play(freq, duration);
Looking into using DirectX DirectSound Ive hit a problem on how WPF using windows handles, as Direct X needs a Windows Form handle.
Does anyone have a solution to play tones in WPF?
Upvotes: 2
Views: 2273
Reputation: 7454
You can use WindowformHost to create window form control and then pass handle of this control to DirectSound, i have done this with DirectShow, it showing video n playing sound for me
Upvotes: 1
Reputation:
You can always use the WindowInteropHelper to get the native handle for your WPF window.
Upvotes: 4