Sign in to follow this  
Followers 0
Jefrey

No sound from AutoIt applications

4 posts in this topic

#1 ·  Posted (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:

screenshot_85.png

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?  o:)

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!  :bye:

Edited 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 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 Random stuff Super Mario beep sound your ears will hurt

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by czardas

Share this post


Link to post
Share on other sites

#3 ·  Posted (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  :geek:

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 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 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 Random stuff Super Mario beep sound your ears will hurt

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by czardas

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0