Solved

Sample Code for using ACM to convert a WAV file

Posted on 1997-06-30
4
470 Views
Last Modified: 2013-12-03
Can someone give me a sample code in C++ that is easy to read and understand on using ACM (Audio Compression Manager) to convert a WAV file say from 16-Bit Stereo to 8-Bit Mono, including converting the sample rate as well.  
0
Comment
Question by:dannil
[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
4 Comments
 
LVL 1

Expert Comment

by:dtowell
ID: 1399644
Don't bother with ACM, just read the samples and write them yourself.  Use the following conversions:

16bit to 8bit:  use only the top 8 bits for each sample
8bit to 16bit:  duplicate the 8bits for each half of the sample
stereo to mono(easy): choose left or right chanel, ignore other
stereo to mono(hard): add left and right and divide by 2
mono to stereo: duplicate data for both channels
22k to 11k: use every other sample
44k to 22k: use every other sample
22k to 44k(easy): duplicate every sample
22k to 44k(hard): interpolate between samples
11k to 22k:  see 22k to 44k
0
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 1399645
There is an example code called "ACMApp" that comes with Video for Windows 1.1 DK. I can send it to you by E-Mail. (Please tell me your E-Mail address.)
0
 

Expert Comment

by:xyzhuang
ID: 1399646
The windows default drivers can not convert the waveform with
sample rate bigger than 48KHz!
So if you want to know the algorithm, please let me know.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1399647
You can refer to WAVEMIX DLL source code. The source code contains some functions to convert standard PCM formats by resampling. You can find it on Microsoft Multimedia JumpStart 2.0 CD-ROM or Microsoft FTP site (I am not sure).
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Enable Clear Text in Win 8.1 7 47
mixing C++ & C# in Vis Studio 2013 7 235
Messagebox for a Web Site Application 4 81
Build VS2015 project in bat command 3 101
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

756 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