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
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