Sound no responsive 
Author Message
 Sound no responsive

The VB language reference gives an example of using Beep -- the sound
command -- Dim I
For I = 1 to 3
    Beep
Next I

If  this example is run you hear ONE beep. I assume the hardware can not
respond as fast as the code runs -- problem is that it takes a very long
delay betwen Beeps to get the sound three times -- can this be made more
responsive? I want a sound to occur when a user hits a key but the sound
is WAY behind the event and you never hear anything if the event occurs
even moderately fast.

Rudy Steury



Sun, 27 Jan 2002 03:00:00 GMT  
 Sound no responsive
If you want to hear 3 beeps, place this in a new form and click on the form:

Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Form_Click()
Dim i As Integer

For i = 1 To 3
Beep
DoEvents
Sleep (100)
Next
End Sub

--
Later,
Jody


http://www.visual-statement.com/vb

Quote:

>The VB language reference gives an example of using Beep -- the sound
>command -- Dim I
>For I = 1 to 3
>    Beep
>Next I

>If  this example is run you hear ONE beep. I assume the hardware can not
>respond as fast as the code runs -- problem is that it takes a very long
>delay betwen Beeps to get the sound three times -- can this be made more
>responsive? I want a sound to occur when a user hits a key but the sound
>is WAY behind the event and you never hear anything if the event occurs
>even moderately fast.

>Rudy Steury




Sun, 27 Jan 2002 03:00:00 GMT  
 Sound no responsive
Doesn't work on my machine until milliseconds nearly 1000.
Could my machine be a problem or is it really that slow when using Beep --

Thanks for the reply


Quote:

> If you want to hear 3 beeps, place this in a new form and click on the form:

> Option Explicit
> Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

> Private Sub Form_Click()
> Dim i As Integer

> For i = 1 To 3
> Beep
> DoEvents
> Sleep (100)
> Next
> End Sub

> --
> Later,
> Jody


> http://www.visual-statement.com/vb


> >The VB language reference gives an example of using Beep -- the sound
> >command -- Dim I
> >For I = 1 to 3
> >    Beep
> >Next I

> >If  this example is run you hear ONE beep. I assume the hardware can not
> >respond as fast as the code runs -- problem is that it takes a very long
> >delay betwen Beeps to get the sound three times -- can this be made more
> >responsive? I want a sound to occur when a user hits a key but the sound
> >is WAY behind the event and you never hear anything if the event occurs
> >even moderately fast.

> >Rudy Steury




Sun, 27 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Sounds - Playing System Event Sounds (asterisk, critical stop, question, etc)

2. sound via sound card?

3. A: Sound Blaster Sound

4. Sound Blaster Sound

5. QBasic Sound Programs using Sound Blaster and Adlib Cards Here

6. Get sound from Sound Card

7. Caputure sound from microphone ( connected with sound card )in VB6

8. Capturing sound info from sound card without a WAV file

9. Sound Controls recording / reversing sounds from within VB

10. Directing Sound to modem or sound card

11. play sound after sound.

12. Making sound through sound card

 

 
Powered by phpBB® Forum Software