Jump to content
luke999

Problema programare

Recommended Posts

Posted (edited)

in vb8 nu stiu cum sa fac sa controlez volumul wave...

as vrea sa fac un programel si mi-ar fi foarte folositor...sper sa stie cineva

SEARCH nu m-ai inteles...intra la volum si vezi ca ai: Volume control , Wave , front , center ....etc

eu vreau sa micsorez/maresc volumul wave

Edited by luke999
Posted


Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click

mciSendString("close myWAV", Nothing, 0, 0)

Dim fileName1 As String = "c:\test1.wav"
mciSendString("open " & fileName1 & " type mpegvideo alias myWAV", Nothing, 0, 0)
mciSendString("play myWAV", Nothing, 0, 0)

'min Volume is 1, max Volume is 1000
Dim Volume As Integer = 100
mciSendString("setaudio myWAV volume to " & Volume, Nothing, 0, 0)

End Sub


Try this:
Click Project, Add Reference, Click on the .NET Tab, scroll down and look for Microsoft.DirectX.AudioVideoPlayBack, Select that then click "Ok"

Then Add this at the very top of your project:

Code:

Imports Microsoft.DirectX.AudioVideoPlayback

Ok then add this under your button or whatever event you want this the file to play on:

Code:

Dim AudioPlay As Audio
AudioPlay = New Audio("C:\sounds\mouseclick2.wav")
AudioPlay.Volume = 50
AudioPlay.Play()

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...