|
Check whether a sound card exists
|
Total Hit (3410) |
If you are developing a game in VB or an application that plays sounds, you probably want to check that a sound card actually exists. There is an API function that does this, and returns the number of sound cards installed in the system. Therefore, a return value of zero means that no devices are pr
....Read More |
Rating
|
|
|
Determine the total playing time of an Audio CD
|
Total Hit (2695) |
The Microsoft Multimedia Control lets you easily determine the total playing time of an Audio CD: you only need to correctly initialize the control and then decipher the value returned by its Length property. Use the following code as a guideline for your routines:
«Code LangId=1»
Private Sub cm
....Read More |
Rating
|
|
|
Open and close the CD drive's door
|
Total Hit (3219) |
Here's a short code snippet that lets you programmatically open and close the CD door. Note that not all the CD drives support these functions:
«Code LangId=1»
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnStr
....Read More |
Rating
|
|
|
Play a CD Audio track
|
Total Hit (3656) |
If you want to play a track of an audio CD from VB you can use MCI functions. The main MCI function is mciSendString, that sends command strings to the system and execute them:
«Code LangId=1»
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (ByVal _
lpstrCommand As String,
....Read More |
Rating
|
|
|
Play a MIDI file
|
Total Hit (4466) |
If you want to play a MIDI file from VB you have to use MCI functions. The main MCI function is mciSendString, that sends command strings to the system and execute them:
«Code LangId=1»
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (ByVal _
lpstrCommand As String, ByVal
....Read More |
Rating
|
|
|
Play an AVI movie
|
Total Hit (5239) |
If you want to play an AVI movie from VB you can use MCI functions. The main MCI function is mciSendString, that sends command strings to the system and execute them:
«Code LangId=1»
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (ByVal _
lpstrCommand As String, ByVal lps
....Read More |
Rating
|
|
|
Play an AVI movie in a PictureBox control
|
Total Hit (5344) |
With MCI functions you can play an AVI movie into a PictureBox. All you need to do is open the file with a special procedure:
«Code LangId=1»
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (ByVal _
lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uR
....Read More |
Rating
|
|
|
Record a WAV file
|
Total Hit (3739) |
You can use MCI functions if you want to record a WAV file. The main MCI function is mciSendString, that sends command strings to the system and execute them.
«Code LangId=1»
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (ByVal _
lpstrCommand As String, ByVal lpstrReturn
....Read More |
Rating
|
|
|
Retrieve the length of a media file (WAV, AVI, MIDI)
|
Total Hit (5743) |
You can retrieve the length of a standard windows media file (WAV, AVI or MIDI) using simple MCI functions. First, you must open the file with:
«Code LangId=1»
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (ByVal _
lpstrCommand As String, ByVal lpstrReturnString As Strin
....Read More |
Rating
|
|
|
Retrieve the size of an AVI movie
|
Total Hit (3958) |
To retrieve the original size of an AVI file that you've already opened with the mciSendString API function you can use this command
«Code LangId=1»
Dim RetString As String
RetString = Space$(256)
CommandString = "where AVIFile destination"
RetVal = mciSendString(CommandString, RetString, Len
....Read More |
Rating
|
|
|
|
|
|
|
|
Working with AVI Files - Part 1 (Opening and Closing AVI file)
|
Total Hit (22187) |
This series of articles will show you step by step approach for working with AVI files in VB using Win32 API. In this article series we will go through following tutorials.
Other articles in this series
«b»«a href='CodeDetail.aspx?CodeId=3612'»Working with AVI Files - Part 1 (Opening and Closi
....Read More |
Rating
|
|
|
Working with AVI Files - Part 2 (Working with AVI streams)
|
Total Hit (16862) |
In previous Article «b»«a href='CodeDetail.aspx?Codeid=3612'»Working with AVI Files - Part 1 (Opening and Closing AVI file)«/a»«/b» We learned how to open and close AVI File. We also learned How to read AVI file information using AVIFileInfo api. In this article we will go one step further. Today we
....Read More |
Rating
|
|
|
Retrive and set Auxiliary devices volume info.
|
Total Hit (3774) |
This code will loop through all Aux devices and set volume to 50%. You might have problem under NT/Win 2000 using auxXXXXXX APIs. Microsft recommands to use mixerXXXXX APIs. auxXXXXXX APIs are old school APIs. But for example purpose we have used auxXXXXXX APIs here.
«code LangId=1»Private Const
....Read More |
Rating
|
|
|
Working with AVI Files - Part 3 (Working With Frames, AVI to BMP)
|
Total Hit (25888) |
In my previous 2 articles «a href='CodeDetail.aspx?CodeId=3612'»«b»Part-1 (Opening and Closing AVI file)«/b»«/a» and «a href='CodeDetail.aspx?CodeId=3613'»«b»Part-2 (Working with AVI Streams)«/b»«/a» you learned that how to open and close AVI file and Stream we also learned how to get basic informat
....Read More |
Rating
|
|
|
Guitar simulation using MIDI APIs
|
Total Hit (5950) |
«b»Step-By-Step Example«/b»
- Create a standard exe project
- Add one listbox, combobox and 2 command button controls
- Add one class module and rename it to clsMIDI
- Add the following code in form1
«b»Form1.frm«/b»
«code LangId=1»Dim objMIDI As New clsMIDI
Private Enum enumInstruments
....Read More |
Rating
|
|
|
Reading and Writing MP3 ID3v1 and ID3v2 Tags
|
Total Hit (1089) |
This article describes the MP3 ID3v1 and ID3v2 tags and provides a sample application which can read and write both types from MP3 files, along with two reusable classes wrapping up the tag functionality.
|
Rating
|
|
|
CD Track Listing Using freedb.org
|
Total Hit (1022) |
This article demonstrates how to use ASPI to read the table of contents from a CD, and then to use FreeDB's CD look-up service to retrieve artist, title and track listing information for the CD. Along the way it describes some of the alternatives and pitfalls.
....Read More |
Rating
|
|
|
Streaming .WAV File Player
|
Total Hit (2196) |
Playing digital audio can be achieved at a number of different levels under windows. At the simplest level, there is the Multimedia Control Interface (MCI) control provided with VB. This is turn is a very thin wrapper around the MCI API provided with Win32, which offers about the same level of contr
....Read More |
Rating
|
|
|
Tutorial : Sound & Games
|
Total Hit (1745) |
These tutorials are were originally developed as part of a VB Game Programming for beginners book Soren and I were working on. For a variety of reasons the book idea never came to fruition and so we decided to post the material that is finished as a series of tutorials in the hopes that you would fi
....Read More |
Rating
|
|
|
Obtaining AVI File Information via API
|
Total Hit (2472) |
This routine shows a couple of things. First and foremost, it details how to retrieve AVI file information from the AVI file using the AVIFileOpen the AVIGetFileInfo APIs. It also shows how to populate a ListView with this information, how to determine the Time Scale for the AVI, and how to use this
....Read More |
Rating
|
|
|
VB Programmer's AVIFile Function Help Pages
|
Total Hit (1208) |
Windows contains a powerful set of video file functions called the AVIFile API ('Application Programming Interface'). The AVIFile API set of functions is part of an even larger API called the Video For Windows API. It is possible to use the AVIFile functions from Visual Basic. However, the lack o
....Read More |
Rating
|
|