Solved

mci SendString Explanation

Posted on 2004-10-17
2
438 Views
Last Modified: 2012-06-21
I've got code that will allow me to record audio from a microphone but I don't totally understand it eg:

Call mciSendString("record capture", RS, 128, CB)

In my example above I know that 'capture' is the name given to that action/process so you can identify it and that the number 128 relates to the input level so this would be '8-bit' sample.

My question is this, what does RS and CB stand for and are there a list of command that I can use inplace/alongside these (the same applies for the 'record' string). The reason I ask is that I'm trying to determine if I can transmit the audio in memory instead of putting it into a file using vb.net.

The MSDN is not so good at explaining this!
0
Comment
Question by:simonallenuk
2 Comments
 

Author Comment

by:simonallenuk
ID: 12332010
oh yea heres the underlying code, notice the RS and CB at the bottom!

'recording from mic
    Private Declare Function mciSendString Lib "winmm.dll" Alias _
            "mciSendStringA" (ByVal lpstrbutton As String, _
            ByVal lpstrReturnString As String, ByVal uReturnLength _
            As Long, ByVal hwndCallback As Long) As Long

Const Path$ = "Test.wav"

Dim RS$, CB&
0
 
LVL 22

Accepted Solution

by:
cookre earned 125 total points
ID: 12333289
The first parm is the command to send to the MCI device.
The second specifies the variable to receive the command output.
The third receives the length of the second.
The fourth, if non-null, specifies a callback address if the command specified a notify .

Here's a list of commands:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_multimedia_command_strings.asp?frame=true


Call definition:
http://www.mentalis.org/apilist/mciSendString.shtml

Note the 'Play MIDI' link at the bottom for a VB example.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with my python script 6 163
zeroMAx challenge 20 102
splitOdd10 challenge 5 107
wordappend challenge 8 177
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question