Modify

#2704 closed Bug (No Bug)

soundsetwavevolume doesn't work with object

Reported by: Champak Owned by:
Milestone: Component: AutoIt
Version: 3.3.10.2 Severity: None
Keywords: Cc:

Description

In the following code soundsetwavevolume works when audio is played through soundplay, but not when played through a wmp object. When played through the object, the volume bar of the script will be moved to the correct position in the windows volume mixer, but the audible volume doesn't actually change unless the bar is clicked on with the mouse.

; SoundPlay("C:\Users\Lab\Music\Test\One Me.mp3")


 $OPLAYER2 = ObjCreate("wmplayer.ocx")
 $OPLAYER2.url = "C:\Users\Lab\Music\Test\One Me.mp3"


For $i = 0 To 100 Step 10
    Sleep(2000)
    Soundsetwavevolume ($i)
Next

Attachments (0)

Change History (2)

comment:1 by Jos, on Aug 24, 2014 at 12:30:10 PM

You are setting the wrong volume and should use:

For $i = 0 To 100 Step 10
    Sleep(2000)
    $OPLAYER2.settings.volume = $i
;~ 	Soundsetwavevolume ($i)
Next

comment:2 by Jos, on Aug 27, 2014 at 8:54:55 PM

Resolution: No Bug
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.