GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 04-Apr-2009, 05:08
ganeshsggs ganeshsggs is offline
New Member
 
Join Date: Jan 2009
Posts: 10
ganeshsggs is on a distinguished road
Thumbs up

Mixing Two Audio files using the Right Shift by two bits


Hello, guys.
I am having trouble mixing two audio files.
I am looking for some info on "Mixing Two Audio files using the Right Shift by two bits".

Any kind of help is much appreciated.

Thank you.
  #2  
Old 04-Apr-2009, 10:13
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,218
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Mixing audio files


Quote:
Originally Posted by ganeshsggs
...I am having trouble mixing two audio files.

What is the program specification? That is: Exactly what is the program required to do. Exactly. What have you tried?

Quote:
Originally Posted by ganeshsggs
I am looking for some info...

In general, "mixing" audio is conceptually simple if the files contain audio values taken at the same sample rate and they both start at the same time and have the same number of samples.

Here's the drill: For each sample time, add the sample values and divide by two.

To avoid overflow, instead of adding and then dividing, you probably want to divide each sample by two and then add.

For integer data types (signed two's complement or unsigned), dividing by two is equivalent to shifting right by one bit.

Regards,

Dave
 
 

Recent GIDBlogAccepted for Ph.D. program by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bloodshed Dev C++ Project Options JdS C++ Forum 6 11-Nov-2005 18:23
Checking source codes of image, audio and video files onauc C Programming Language 5 26-Feb-2005 22:47
I need a reliable audio video webhost onauc Web Hosting Forum 1 20-Dec-2004 10:28

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:22.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.