Jefrey Posted December 19, 2014 Share Posted December 19, 2014 (edited) Hi I'm having a weird trouble in using sounds in AutoIt (I just discovered it when trying to use SAPI (speech)). The sound isn't played on my speakers, although it displays the sound level on the mixer. See this to know what I'm talking about: As you can see, the sound level for "AutoIt v3 Script" is showing, but the main "Speakers" (Alto-falantes, in portuguese), does not show anything. It is not mute or anything else. Some tests I did showed that: AutoIt Beep() function works (and plays), but the sound level is showed on "Speakers" and "System sounds". No "AutoIt v3 script" is showed. SoundPlay("C:WINDOWSMediaonestop.mid", 1) does the same thing like the image above: it shows the sound level, but I can't hear anything. #RequireAdmin makes no difference Going to Speech configuration on Control Panel works; I can hear the spoken text. Yes, I can play - and hear - musics on this computer No, I'm not deaf... --- EDIT --- Well, sorry guys, right after posting this topic I suddenly wanted to test what happens if i put SoundSetWaveVolume(100). It worked! Idea from God? As it looks like, AutoIt saves the last percent value set by SoundSetWaveVolume() function and uses it for all the other AutoIt scripts that you're going to run after it. Even if you restart your computer, the value is still stored. So I just put SoundSetWaveVolume(100) and run it. Now everything works, even if I remove that line. Thanks! Edited December 19, 2014 by Jefrey My stuff Spoiler My UDFs _AuThread multithreading emulation for AutoIt · _ExtInputBox an inputbox with multiple inputs and more features · forceUTF8 fix strings encoding without knowing its original charset · JSONgen JSON generator · _TCPServer UDF multi-client and multi-task (run on background) event-based TCP server easy to do · _TCPClient_UDF multi-server and multi-task (runs on background) event-based TCP client easy to do · ParseURL and ParseStr functions ported from PHP · _CmdLine UDF easily parse command line parameters, keys or flags · AutoPHP Create documents (bills, incomes) from HTML by sending variables/arrays from AutoIt to PHP · (Un)Serialize Convert arrays and data into a storable string (PHP compatible) · RTTL Plays and exports to MP3 Nokia-format monophonic ringtones (for very old cellphones) · I18n library Simple and easy to use localization library · Scripting.Dictionary OOP and OOP-like approach · Buffer/stack limit arrays to N items by removing the last one once the limit is reached · NGBioAPI UDF to work with Nitgen fingerprint readers · Serial/Licensing system require license key based on unique machine ID from your users · HTTP a simple WinHTTP library that allows GET, POST and file uploads · Thread true AutoIt threads (under-dev) · RC4 RC4 encryption compatible with PHP and JS · storage.au3 localStorage and sessionStorage for AutoIt Classes _WKHtmlToX uses wkhtmlto* to convert HTML files and webpages into PDF or images (jpg, bmp, gif, png...) Snippets _Word_DocFindReplaceByLongText replace strings using Word UDF with strings longer than 255 characters (MSWord limit) rangeparser parser for printing-like pages interval (e.g.: "1,2,3-5") EnvParser parse strings/paths with environment variables and get full path GUICtrlStaticMarquee static text scrolling Random stuff Super Mario beep sound your ears will hurt Link to comment Share on other sites More sharing options...
czardas Posted December 19, 2014 Share Posted December 19, 2014 (edited) Perhaps some other application set the volume too low, or maybe you did it by accident. If it's another program which is responsible, then it could happen again when you run that program in the future. It's something to consider. Edited December 19, 2014 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Jefrey Posted December 19, 2014 Author Share Posted December 19, 2014 (edited) On 2014-12-18 at 11:11 PM, czardas said: Perhaps some other application set the volume too low, or maybe you did it by accident. If it's another program which is responsible, then it could happen again when you run that program in the future. It's something to consider. I think some of my programs are responsible Do you know some way to get the wave volume (something like "SoundGetWaveVolume()"?) So I can restore it when I have to change it. Edit: AutoIt internally uses waveOutSetVolume function, and winmm.dll has waveOutGetVolume. Gonna take a look. Edited May 30, 2017 by Jefrey My stuff Spoiler My UDFs _AuThread multithreading emulation for AutoIt · _ExtInputBox an inputbox with multiple inputs and more features · forceUTF8 fix strings encoding without knowing its original charset · JSONgen JSON generator · _TCPServer UDF multi-client and multi-task (run on background) event-based TCP server easy to do · _TCPClient_UDF multi-server and multi-task (runs on background) event-based TCP client easy to do · ParseURL and ParseStr functions ported from PHP · _CmdLine UDF easily parse command line parameters, keys or flags · AutoPHP Create documents (bills, incomes) from HTML by sending variables/arrays from AutoIt to PHP · (Un)Serialize Convert arrays and data into a storable string (PHP compatible) · RTTL Plays and exports to MP3 Nokia-format monophonic ringtones (for very old cellphones) · I18n library Simple and easy to use localization library · Scripting.Dictionary OOP and OOP-like approach · Buffer/stack limit arrays to N items by removing the last one once the limit is reached · NGBioAPI UDF to work with Nitgen fingerprint readers · Serial/Licensing system require license key based on unique machine ID from your users · HTTP a simple WinHTTP library that allows GET, POST and file uploads · Thread true AutoIt threads (under-dev) · RC4 RC4 encryption compatible with PHP and JS · storage.au3 localStorage and sessionStorage for AutoIt Classes _WKHtmlToX uses wkhtmlto* to convert HTML files and webpages into PDF or images (jpg, bmp, gif, png...) Snippets _Word_DocFindReplaceByLongText replace strings using Word UDF with strings longer than 255 characters (MSWord limit) rangeparser parser for printing-like pages interval (e.g.: "1,2,3-5") EnvParser parse strings/paths with environment variables and get full path GUICtrlStaticMarquee static text scrolling Random stuff Super Mario beep sound your ears will hurt Link to comment Share on other sites More sharing options...
czardas Posted December 19, 2014 Share Posted December 19, 2014 (edited) There seem to be some topics in Example Scripts you could try: I imagine you should be able to simply read a registory setting, but I'm not sure - not without deeper investigation. Someone else will probably have the answer - I don't have time to test much ATM. It's an old topic I linked to above. Edited December 19, 2014 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now