?
Solved

mci SendString Explanation

Posted on 2004-10-17
2
Medium Priority
?
443 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 500 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

801 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