Stereo to Mono
Ever thought of listening to 2 songs at the same time?? Well now you can.
Wav file can have multiple channels. If a wav file has 2 channels, & you are using headphones to listen to the audio, both the channels are played independently on the left & right side of the headphones.
mix.cpp takes 2 wav files as input and produces a third wav file as output. This output wav file has 2 channels. The first channel is composed of the the first input wav file & the 2nd channel is composed of the 2nd input wav file.
So when you listen to the output wav files, you can listen to 2 different songs (audio files) at the same time. One playing on the left side of the headphone & the other on the right side of the headphone.
Demo | |
---|---|
Input File 1 | demo / song1.wav |
Input File 1 Wave diagram | ![]() |
Input File 2 | demo / song2.wav |
Input File 2 Wave diagram | ![]() |
Output File | demo / song1 + song2.wav |
Output File Wave diagram | ![]() |
Demo | |
---|---|
Input Stereo file | demo / stereo_file.wav |
Wave of input stereo file | ![]() |
Output Mono file | demo / mono_file.wav |
Wave of ouput mono file | ![]() |
1. Microsoft WAVE soundfile format - soundfile.sapp.org
2. Wav (RIFF) File Format Tutorial - topherlee.com
3. Number Systems for Digital Audio - dsprelated.com