Patent ID: 8194862

Claim:
A method of encoding audio, comprising: at an audio encoding system including one or more processors and memory, during execution of a video game by a computer system: receiving an instruction to mix a first independent encoded audio stream with a second independent encoded audio stream, the first and second independent encoded audio streams each comprising a sequence of frames, wherein respective frames of each sequence comprise floating-point frequency samples divided into a plurality of frequency bands, the floating-point frequency samples of a respective frequency band of a respective frame of the first independent encoded audio stream being scaled by a first scale factor, the floating-point frequency samples of a respective frequency band of a respective frame of the second independent encoded audio stream being scaled by a second scale factor; in response to the instruction to mix the first independent encoded audio stream with the second independent encoded audio stream, combining respective floating-point frequency samples of the first and second independent encoded audio streams, the combining comprising: calculating an adjusted scale factor as a first function of a difference between the first and second scale factors; scaling the floating-point frequency samples of the respective frequency band of the respective frame of the first independent encoded audio stream by a first ratio of the first scale factor to the adjusted scale factor; scaling the floating-point frequency samples of the respective frequency band of the respective frame of the second independent encoded audio stream by a second ratio of the second scale factor to the adjusted scale factor; and adding respective floating-point frequency samples of the first independent encoded audio stream, as scaled by the first ratio, to respective floating-point frequency samples of the second independent encoded audio stream, as scaled by the second ratio; and generating an output bitstream comprising the combined respective floating-point frequency samples.