Playsound("test.wav"); not working

 
My playsound function has always worked properly and I've been writing code for metatrader since it was released back around 2005, just to clarify that I'm not new at this.. but now my playsound function only outputs a beep sound no matter which wave file I play.

I checked the Boolean return code from the function and when I give it an incorrect wave file name it returns a zero but when I give it a wave file name that exists it returns a one so I'm assuming that it's actually finding the file.

I don't know if it will matter but I have installed the metatrader platform under C:\mt4 and the wave files are located in c:\mt4\sounds

I can't imagine why my sound files are not playing.

Thank you for any help.
 
Your topic has been moved to the section: MQL4 e MetaTrader 4 — In the future, please consider which section is most appropriate for your query.
 
TRADE CODE:
My playsound function has always worked properly and I've been writing code for metatrader since it was released back around 2005, just to clarify that I'm not new at this.. but now my playsound function only outputs a beep sound no matter which wave file I play.

I checked the Boolean return code from the function and when I give it an incorrect wave file name it returns a zero but when I give it a wave file name that exists it returns a one so I'm assuming that it's actually finding the file.

I don't know if it will matter but I have installed the metatrader platform under C:\mt4 and the wave files are located in c:\mt4\sounds

I can't imagine why my sound files are not playing.

Thank you for any help.

Is your folder name literally "sounds" ? Or is it "Sounds"

Can you post your PlaySounds() code for inspection ? 


Check your path to terminal directory


https://docs.mql4.com/runtime/resources

Resources - MQL4 programs - MQL4 Reference
Resources - MQL4 programs - MQL4 Reference
  • docs.mql4.com
Resources - MQL4 programs - MQL4 Reference
 
TRADE CODE:
My playsound function has always worked properly and I've been writing code for metatrader since it was released back around 2005, just to clarify that I'm not new at this.. but now my playsound function only outputs a beep sound no matter which wave file I play.

I checked the Boolean return code from the function and when I give it an incorrect wave file name it returns a zero but when I give it a wave file name that exists it returns a one so I'm assuming that it's actually finding the file.

I don't know if it will matter but I have installed the metatrader platform under C:\mt4 and the wave files are located in c:\mt4\sounds

I can't imagine why my sound files are not playing.

Thank you for any help.

Forum on trading, automated trading systems and testing trading strategies

How to report technical issues?

Alain Verleyen, 2023.06.20 16:23

To get good and efficient help you need to provide all the relevant technical informations about your context when using the application (MT5 desktop terminal, MT5 mobile version, mql5.com service usage, etc...)

The first important things is to provide the Build (MT5 3802, MT5 Mobile xyz...) and Operating System (Windows 10, Windows 11, Mac, Linux, Windows Server...) you are using. The most efficient way to do that (for MT5 desktop Terminal) is by checking the Journal log in the Toolbox window.

1. Display the toolbox window if not yet done. Pressing CTRL+T or clicking on the toolbar button.

2. On the toolbox window, click on the Journal tab.


3. In the Journal tab window, there can be a lot of information, go back to the start of the log.

4. At the beginning of the Journal window log, you will see some lines about your configuration.

Please report them on the forum, either with copy and paste, a screenshot, or even better by providing the log file.

Example of copy and paste :

- Select the lines

- Right-click inside the selection.

- Pick "Copy". Then paste it here on the forum.


If you are creating an alert under MT4 (Terminal window, Alerts tab), is the sound played correctly ?

Reason: