An example of PCM audio conversion and Mixing

Source: Internet
Author: User
During voice communication, you often encounter situations where you need to convert audio signals of a certain format into audio signals of another format and mix two or more audio signals. For more information, see the information found on the Internet, I made an example. ProgramThis program can convert two 8-bit 8000 sample 1 channel pcm a-Law audio files into 16-bit 8000 sample 1 channel PCM line audio data that is easy to mix, then, the two signals are mixed, and the mixing result is converted to 8bit 8000 sample 1 channel pcm a-Law format for storage.
ACM is used for format conversion. For details, refer to calling ACM audio programming interface to compress wave audio under VC (for the original article, refer to Google ), mixing is accumulated using the simplest linear accumulation method.
I provide two files a1.pcm and a2.pcm. Click the convert button to convert the two files to b1.pcm and b2.pcm. After these two files are generated, click the mix button to mix b1.pcm and b2.pcm and generate M. PCM.

The formats of a1.pcm, a2.pcm, and M. PCM are 8bit 8000 sample 1 channel pcm a-Law.
B1.pcm and b2.pcm are in 16bit 8000 sample 1 channel PCM line format.
The preceding files can be opened using cooledit or Adobe audition.

The project is based on codegear C ++ builder 2007 and passes debugging on Windows Server 2003 and Vista.

CodeDownload: Click here to download

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.