Muting and controlling the volume

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Clark

    Muting and controlling the volume

    Hello all,

    I'm developing an application thats operation requires the volume NOT to be
    muted - for notification purposes.

    I've had a quick look round and don't seem to be having much luck - has
    anyone done this before that can point me in the right direction?

    Thanks,

    JC


  • John Clark

    #2
    Re: Muting and controlling the volume


    "John Clark" <john@johnNOTHI SBITclark.me.uk > wrote in message
    news:hYw1d.1$hm .0@newreader.uk core.bt.net...[color=blue]
    > Hello all,
    >
    > I'm developing an application thats operation requires the volume NOT to
    > be muted - for notification purposes.
    >
    > I've had a quick look round and don't seem to be having much luck - has
    > anyone done this before that can point me in the right direction?
    >
    > Thanks,
    >
    > JC
    >[/color]

    Actually, just muting all or unmuting all would be the biggest help - I'm
    guessing this is some sort of API call with winmm?


    Comment

    • Dick

      #3
      Re: Muting and controlling the volume

      Perhaps (VB6 code):

      Private Declare Function waveOutSetVolum e Lib "Winmm" (ByVal wDeviceID As
      Integer, ByVal dwVolume As Long) As Integer
      Private Declare Function waveOutGetVolum e Lib "Winmm" (ByVal wDeviceID As
      Integer, dwVolume As Long) As Integer

      Private Sub Command1_Click( )
      Dim a, i As Long
      Dim tmp As String
      a = waveOutGetVolum e(0, i)
      tmp = "&h" & Right(Hex$(i), 4)
      Text1 = CLng(tmp)
      End Sub

      Private Sub Command2_Click( )
      Dim a, i As Long
      Dim tmp, vol As String
      vol = Text1
      tmp = Right((Hex$(vol + 65536)), 4)
      vol = CLng("&H" & tmp & tmp)
      a = waveOutSetVolum e(0, vol)
      End Sub



      "John Clark" <john@johnNOTHI SBITclark.me.uk > wrote in message
      news:lux1d.2$hm .0@newreader.uk core.bt.net...[color=blue]
      >
      > "John Clark" <john@johnNOTHI SBITclark.me.uk > wrote in message
      > news:hYw1d.1$hm .0@newreader.uk core.bt.net...[color=green]
      > > Hello all,
      > >
      > > I'm developing an application thats operation requires the volume NOT to
      > > be muted - for notification purposes.
      > >
      > > I've had a quick look round and don't seem to be having much luck - has
      > > anyone done this before that can point me in the right direction?
      > >
      > > Thanks,
      > >
      > > JC
      > >[/color]
      >
      > Actually, just muting all or unmuting all would be the biggest help - I'm
      > guessing this is some sort of API call with winmm?
      >
      >[/color]


      Comment

      Working...