Hi,
Is there a way to generate sounds from within a WL8 strategy?
Thanks!
Is there a way to generate sounds from within a WL8 strategy?
Thanks!
Rename
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
https://learn.microsoft.com/en-us/dotnet/api/system.media.systemsounds?view=windowsdesktop-9.0
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.
"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.
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
https://www.wealth-lab.com/Discussion/Play-sounds-in-C-code-10524
Your Response
Post
Edit Post
Login is required