Solved

mci SendString Explanation

Posted on 2004-10-17
2
436 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Web Application Architecture 6 68
python pyusb how to find a file on mass storage 3 74
NotAlone Challenge 20 70
Specific format 21 142
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
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 viewer will learn how to implement Singleton Design Pattern in Java.
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.

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now