View Single Post
  #8 (permalink)  
Old 02-25-2004, 04:58 PM
Fred Marshall
Guest
 
Posts: n/a
Default Re: Is there a quick, not much processing time needed, way to make the same volume on a 16 signed int stream in real time?


"SA Dev" <[email protected]> wrote in message
news:[email protected]..
> Hi Bob,
>
> > Must this be done in real time or is it possible to analyze
> > the sound produced by each game as it is installed, for
> > example? If the latter, you can do the root mean square
> > calculation to determine an average level for each such
> > game, save it somewhere, and apply a fixed gain (numerical
> > multiplication factor) to each sample at play time that is a
> > the ratio of the desired average level to the predetermined
> > level of the game.

>
> Yes, someone elses approach was similar to this (they didn't use RMS, but
> rather just rather just peaks to determine if the volume was too loud).
> They started out at 10 times normal volume and reduced the volume if
> necessary to make it fit within the 16 bit integer. Then they stored the
> multiplication factor so the game would start out next at the already
> reduced factor. So, one time the game was run, sounds at first might be
> louder than they should be until the loudest sounds of the game were
> encountered, but then they would be leveled out. The problem is that

their
> idea of looking at the peaks only resulted in wide variations between

games.
> I think that is the part of their logic that is flawed.
>
> I agree with the store multiplication factor, but the technique for using
> the peaks to determine volume doesn't work well. That is what I'm trying

to
> improve.


"using the peaks doesn't work well" in what way?

You might consider averaging (lowpass filtering) the peaks so the highest
one or two don't drive the result - IF that's your concern.

Fred


Reply With Quote