VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Indicates the possibility of playing sound with the sound card

by Waty Thierry (60 Submissions)
Category: Sound/MP3
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 13th April 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Indicates the possibility of playing sound with the sound card

Rate Indicates the possibility of playing sound with the sound card



Private Declare Function midiOutGetNumDevs Lib "winmm" () As Integer

Public Function CanPlaySound() As Integer
   ' #VBIDEUtils#************************************************************
   ' * Programmer Name  : Waty Thierry
   ' * Web Site         : www.geocities.com/ResearchTriangle/6311/
   ' * E-Mail           : [email protected]
   ' * Date             : 20/11/98
   ' * Time             : 09:33
   ' * Module Name      : Multimedia_Module
   ' * Module Filename  : Multimedia.bas
   ' * Procedure Name   : CanPlaySound
   ' * Parameters       :
   ' **********************************************************************
   ' * Comments         : Indicates the possibility of playing sound with the sound card
   ' *  Returns 1 if wave output
   ' *  Returns 2 if midi output
   ' *  Returns 3 if both
   ' *
   ' **********************************************************************
   
   Dim I             As Integer
   
   I = AUDIO_NONE
   
   If waveOutGetNumDevs > 0 Then
      I = AUDIO_WAVE
   End If
   
   If midiOutGetNumDevs > 0 Then
      I = I + AUDIO_MIDI
   End If
   
   CanPlaySound = I
   
End Function




Download this snippet    Add to My Saved Code

Indicates the possibility of playing sound with the sound card Comments

No comments have been posted about Indicates the possibility of playing sound with the sound card. Why not be the first to post a comment about Indicates the possibility of playing sound with the sound card.

Post your comment

Subject:
Message:
0/1000 characters