Solved

How do I change to sample rates, for MCI mcirophone

Posted on 1997-10-27
1
356 Views
Last Modified: 2013-11-20
Im using MCI to record a 'wav' file using the microphone.
My problem is that I would like to be able to change the sample rate, from the c++ program, and I dont know how to.
Can anyone enlighten me how to do this
Thanks in advance
Yakky
0
Comment
Question by:yakky
1 Comment
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 1308879
Use the MCI_SET command with MCI_WAVE_SET_SAMPLESPERSEC flag.

MCIERROR mciSendCommand(MCIDEVICEID wDeviceID, MCI_SET,
    DWORD dwFlags, (DWORD) (LPMCI_SET_PARMS) lpSet);


MCI_WAVE_SET_SAMPLESPERSEC

Sets the samples per second used for playing, recording, and saving to the nSamplesPerSec member of the structure identified by lpSet.

For waveform-audio devices, the lpSet parameter points to an MCI_WAVE_SET_PARMS structure.

Several properties of waveform-audio data are defined when the file to store the data is created. These properties describe how the data is structured within the file and cannot be changed once recording begins. The following list of flags identifies these properties:

¡¤ MCI_WAVE_SET_AVGBYTESPERSEC

¡¤ MCI_WAVE_SET_BITSPERSAMPLE

¡¤ MCI_WAVE_SET_BLOCKALIGN

¡¤ MCI_WAVE_SET_CHANNELS

¡¤ MCI_WAVE_SET_FORMATTAG

¡¤ MCI_WAVE_SET_SAMPLESPERSEC

0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

746 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

12 Experts available now in Live!

Get 1:1 Help Now