Solved

mci SendString Explanation

Posted on 2004-10-17
2
441 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
static method overriding vs normal non static method overriding in child class 13 120
scoresSpecial  challenge 13 68
convert Systemjs to Webpack 3 124
troubleshoot a python script 8 113
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

732 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