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
Solved

mci SendString Explanation

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
static class 3 74
copyEvens challenge 6 105
What language/protocol is the Angular Chat? 2 84
Excel file not created as expected 7 79
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
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.
This video teaches viewers about errors in exception handling.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

856 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