Results 1 to 2 of 2

Thread: PlaySpeakerWave

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Location
    uk liverpool
    Posts
    238

    PlaySpeakerWave

    how do use just a normal wav.sound

    this is what i using but i need to funk it up alot



    code

    PlaySpeakerWave "C:\WINDOWS\Media\chimes.wav"

  2. #2
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    When you say PlaySpeakerWave do you want to play the wave file through your PC speaker?. Or is PlaySpeakerWave just your sub call?

    VB Code:
    1. Public Declare Function sndPlaySound Lib "winmm.dll" _
    2. Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
    3. ByVal uFlags As Long) As Long
    4.  
    5. Public Const SND_ASYNC = &H1
    6. Public Const SND_NODEFAULT = &H2
    7.  
    8. Public Sub PlaySound(Soundname As String)
    9.  
    10. Call sndPlaySound(Soundname, SND_ASYNC Or SND_NODEFAULT)
    11.  
    12. End Sub

    This is just the basic playing a wave file.

    I've just seen your other thread. PlaySpeakerWave is the function at is used in the app someone sent you (soundkey). It's a bad use of a function to play a wave file. Functions should return a value. You don't need anything returning from playing a wave file.

    http://www.vbforums.com/showthread.p...hreadid=297901
    Last edited by Keithuk; Jul 20th, 2004 at 05:44 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width