A method of encoding an audio stream comprising the following steps: receiving, at an audio encoder executed on a processor, an audio stream (5b, 5c) to be transmitted to a receiving device via a communications channel, the processor having an amount of available processing resources; encoding, by the audio encoder, the audio stream (5b, 5c) using an allocated portion of processing resources; and transmitting the encoded audio stream to the receiving device via the communications channel, characterized by the further steps: determining an available bandwidth, BW, of the communications channel; and allocating to the audio encoder a portion of the available processing resources by selecting (S12, S16, S18) based on the determined bandwidth, BW, one of a plurality of encoding modes, low complexity, LC, and high complexity, HC, of the audio encoder having different complexities, and configuring the encoder to operate in the selected encoding mode to encode the audio stream (5b, 5c), wherein a higher complexity one of the encoding modes, LC, HC, requiring the greater portion of the available processing resources is selected if the determined bandwidth, BW, is below a bandwidth threshold, T1, wherein the portion of the processing resources allocated to the audio encoder differs with a rate no greater than a maximum allocation change rate that is independent of the available bandwidth, BW. receiving, at an audio encoder executed on a processor, an audio stream (5b, 5c) to be transmitted to a receiving device via a communications channel, the processor having an amount of available processing resources; encoding, by the audio encoder, the audio stream (5b, 5c) using an allocated portion of processing resources; and transmitting the encoded audio stream to the receiving device via the communications channel, characterized by the further steps: determining an available bandwidth, BW, of the communications channel; and allocating to the audio encoder a portion of the available processing resources by selecting (S12, S16, S18) based on the determined bandwidth, BW, one of a plurality of encoding modes, low complexity, LC, and high complexity, HC, of the audio encoder having different complexities, and configuring the encoder to operate in the selected encoding mode to encode the audio stream (5b, 5c), wherein a higher complexity one of the encoding modes, LC, HC, requiring the greater portion of the available processing resources is selected if the determined bandwidth, BW, is below a bandwidth threshold, T1, wherein the portion of the processing resources allocated to the audio encoder differs with a rate no greater than a maximum allocation change rate that is independent of the available bandwidth, BW. determining an available bandwidth, BW, of the communications channel; and allocating to the audio encoder a portion of the available processing resources by selecting (S12, S16, S18) based on the determined bandwidth, BW, one of a plurality of encoding modes, low complexity, LC, and high complexity, HC, of the audio encoder having different complexities, and configuring the encoder to operate in the selected encoding mode to encode the audio stream (5b, 5c), wherein a higher complexity one of the encoding modes, LC, HC, requiring the greater portion of the available processing resources is selected if the determined bandwidth, BW, is below a bandwidth threshold, T1, wherein the portion of the processing resources allocated to the audio encoder differs with a rate no greater than a maximum allocation change rate that is independent of the available bandwidth, BW.