- ago
Hi,
Is there a way to generate sounds from within a WL8 strategy?
Thanks!
0
48
Solved
3 Replies

Reply

Bookmark

Sort
- ago
#1
I would call the appropriate .NET class (system.media) to play sounds.
https://learn.microsoft.com/en-us/dotnet/api/system.media.systemsounds?view=windowsdesktop-9.0
0
- ago
#2
I had "using System.Media;" in the original code which ran on VS2022 (this is the trade code). The signaling code is a WL6 strategy. When I move the trade code into WL8 I see the following error message:
"The type or namespace name 'Media' does not exist in the namespace 'System' (are you missing an assembly reference?)".
I see comments on the web that System.Media is not available for .NETCore.

By the way the very long signaling code (400K lines) is now working in WL8. It took me three months of transcribing plus another month of fine tuning. It takes a little longer than WL6 but this is OK.
0
Glitch8
 ( 11.64% )
- ago
#3
A forum search (inclusive of forum text) for "SoundPlayer" yielded this solution, note you'll need to add some assembly references using the Tools, Assembly References.

https://www.wealth-lab.com/Discussion/Play-sounds-in-C-code-10524
0
Best Answer

Reply

Bookmark

Sort