Sign in to follow this  
Followers 0
trancexx

Beep

6 posts in this topic

DirectSound offers plenty. Up until recently it was unavailable in AutoIt. AutoItObject obviously changed that.

Example that follows is using IDirectSound (IDirectSound8 precisely) and IDirectSoundBuffer interfaces to generate beep sound in your speakers.

Normally you would use Beep(), but on some systems that function is unavailable (XP x64 and some more). When you want to be sure beep occurs you have to have a backup plan. This is one possible backup.

Difference between the built-in beep is that on x64 systems simulation beep will be sine wave which is soft(er) and this script, for example, will play square wave which sounds very similar to original onboard beeper sound.

You will need AutoItObject.au3.

Script:

Beep.au3


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites



Lol. Very clever. I won't give away the joke :(

Share this post


Link to post
Share on other sites

Oh thats great.


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Here's another example with DirectSound. WAVE file(data) player. Something similar to what monoceres posted 100 years ago with flat waveOutWrite function (I saved that script with name WAVE_PlayStructure.au3).

Now with DirectSound. And with total control through it. You can play faster, slower, left, right, stop, play from,...

In the example I'm just playing with speed.

Zip includes script and wav file:

PlayWAVE.zip

Again AutoItObject.au3 is required.

Someone might ask: "Why would I play wav at all and why like that?"

Except the fact that you are actually playing raw binary data (variable, resource of your exe, dll, whatever), there isn't much sense.

In more than one occasion you would need to do just that.


♡♡♡

.

eMyvnE

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