Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Music Volume

Status
Not open for further replies.

arkomnv

Programmer
May 22, 2006
14
BE
Hello there

I am using:

Microsoft.DirectX.AudioVideoPlayback


to play audio files


I have 2 consoles so now i can play 2 songs at the same time now i would like to ad some more controls to them:

Like control the volume of each player

this is the code i have in the class where all the controles are at:

Code:
Public Property MediaVolume() As Integer
        Get
            If m_MediaType1 = "Audio" Then
                Me.m_Volume1 = objAudio1.Volume
          
            End If
            Return Me.m_Volume1
        End Get

        Set(ByVal Value As Integer)
            Me.m_Volume1 = Value

            If m_MediaType1 = "Audio" Then
                objAudio1.Volume = Value
                
            End If
        End Set
    End Property


Now i am trying to control the soundvolume of the first music consol:

i tryed to do it whit this code:

Code:
Private Sub Sound1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Sound1.Scroll
        MMedia1.MediaVolume = Me.Sound1.Value
    End Sub


but i does nothing to the volume
The value changes i checked that but no change in the volumelevel

can anyone help me out with this one ???


THX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top