A
system and method of the present invention cross-fade a first transmitted audio
stream to a second transmitted audio
stream, wherein both first and second audio streams represent the same original
audio signal, but at different quality levels. A
client computer receives timestamped packets of compressed encoded audio data from the first audio
stream,
decodes that data and resamples it to a highest sampling rate supported by playback equipment such as a
sound card. A
server computer responds to a change in available bandwidth, by transmitting timestamped packets of the second audio stream which correspond to a playback time earlier than that of the final transmitted packet of the first audio stream. The
client computer buffers in a first buffer the decoded resampled samples from the final packets of the first audio stream, which represent a playback time period t1. The
client computer then buffers in a second buffer decoded resampled samples from the initial packets of the second audio stream representing a playback time period t2. A cross-fade overlap window is defined by a time period t3 over which t1 and t2 overlap. A cross-fader cross-fades sample pairs drawn from both buffers, each pair corresponding to a playback time in the cross-fade overlap window. A cross-fade table holds a predetermined number of values decreasing from 1 to 0, which values approximate a cross-fade curve. The cross-fader applies a
weight value to each sample pair, the
weight value calculated by applying linear interpolation across adjacent values in the cross-fade table, by multiplying a sample from the first audio stream by the
weight value, and by multiplying a time-corresponding sample from the second audio stream by one minus the weight value. The resulting contributions from both samples are combined and sent to audio
reproduction equipment.