Home > Software engineering >  For a great god!!!!!! VB how sound playback of audio
For a great god!!!!!! VB how sound playback of audio

Time:10-05

I now connect more than one sound card, computer, how to realize the choice which the sound card, which sound is playing sound, I just contact with vb, specific operations for a great god!

CodePudding user response:

And actually use what kind of programming environment is not too big relations, Windows provides the corresponding API interface,

Public Declare Function waveOutGetNumDevs Lib "winmm. DLL" Alias "waveOutGetNumDevs" () As Long

Public Declare Function waveOutGetDevCaps Lib "winmm. DLL" Alias "waveOutGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As WAVEOUTCAPS, ByVal uSize As Long) As Long

Public Declare Function waveOutOpen Lib "winmm. DLL" Alias "waveOutOpen" (lphWaveOut As Long, ByVal uDeviceID As Long, lpFormat As WAVEFORMAT, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long

Public Declare Function waveOutPrepareHeader Lib "winmm. DLL" Alias "waveOutPrepareHeader" (ByVal hWaveOut, As Long As lpWaveOutHdr WAVEHDR, ByVal uSize As Long) As Long

Public Declare Function waveOutWrite Lib "winmm. DLL" Alias "waveOutWrite" (ByVal hWaveOut, As Long As lpWaveOutHdr WAVEHDR, ByVal uSize As Long) As Long

Public Declare Function waveOutUnprepareHeader Lib "winmm. DLL" Alias "waveOutUnprepareHeader" (ByVal hWaveOut, As Long As lpWaveOutHdr WAVEHDR, ByVal uSize As Long) As Long

Public Declare Function waveOutClose Lib "winmm. DLL" Alias "waveOutClose" (ByVal hWaveOut As Long) As Long

The Internet search, a lot of instructions and examples,

CodePudding user response:

That these functions are declared within the module or class module, all need to use it, before have no contact with these, can say more specific, or the application examples of what

CodePudding user response:

The best statement in the standard module, if statement in the form of Public area, want to change the Public to Private,

Example a search of the Internet a lot,
  • Related