title: Modifying audio files sample widths in python?
body: <p><strong>Preamble:</strong></p>
  
  <p>I have a psychology project that I must play two different audio files in two distinct separate speaker simultaneously. And the listener must try to focus on one of them and say what he hear.</p>
  
  <p><strong>Issue:</strong></p>
  
  <p>As a part of this project I must be able to modify the ratio of the volume of the first file to the second file. As different audio files has different shape in their signals, we can't say that this file volume is twice or half or ... volume of the other file. </p>
  
  <p><strong>My Solution:</strong></p>
  
  <p>I decided to calculate average of all the samples in both files separately and then check the ratio of average of first file frames to the average of second file frames. And multiple/divide all the frames' lengths by a number to change the volume ration.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>I must know the maximum and minimum value of samples' widths in files. but after a Google search I found nothing. </p>
  
  <p><strong>Question:</strong></p>
  
  <p>Does different type (<em>mp3</em>, <em>wav</em>, etc) audio files' frames have equal maximun and minimum value for their sample width? If so, how much are they?</p>
  
  <p>If different types has different value for maximum and minimum sample widths, is it fixed per type? If so, how much is it for <code>wav</code> and <code>mp3</code>?</p>