A method of controlling an audio output of an electronic device, the method comprising: receiving an audio output control mode selection from a user; detecting an audio output device connected to the electronic device from a plurality of recognized audio devices; determining a type of audio output device associated with the audio output device connected to the electronic device, which type of audio device is stored in a storage unit; determining a plurality of previous audio output levels, stored in said storage unit, associated with the type of audio output device; characterized by calculating an average value of the plurality of previous audio output levels associated with the type of audio output device; determining whether the audio output control mode is an automatic control mode or a manual control mode; selecting, if the audio output control mode is the automatic control mode, a first audio output level and controlling the audio output device to transmit an audio output at a second audio output level; comparing, if the audio output control mode is the manual control mode, the average value of the plurality of the previous audio output levels associated with the type of audio output device to a predetermined audio output level; controlling (250, 280) the audio output device to transmit the audio output at the second audio output level when the average value of the plurality of the previous audio output levels is not greater than the predetermined audio output level; controlling (270, 280) the audio output device to transmit the audio output at a third audio output level when the average value of the plurality of the previous audio output levels is greater than the predetermined audio output level, wherein the first audio output level equals the average value of a plurality of previous audio output levels associated with the type of audio output device, wherein the third audio output level equals the predetermined audio output level, and wherein the audio output device is a wired or wireless audio output device, the audio output device being one of a set of audio output devices comprising at least a wired earphone, an internal speaker, a Bluetooth headset and an external speaker. receiving an audio output control mode selection from a user; detecting an audio output device connected to the electronic device from a plurality of recognized audio devices; determining a type of audio output device associated with the audio output device connected to the electronic device, which type of audio device is stored in a storage unit; determining a plurality of previous audio output levels, stored in said storage unit, associated with the type of audio output device; characterized by calculating an average value of the plurality of previous audio output levels associated with the type of audio output device; determining whether the audio output control mode is an automatic control mode or a manual control mode; selecting, if the audio output control mode is the automatic control mode, a first audio output level and controlling the audio output device to transmit an audio output at a second audio output level; comparing, if the audio output control mode is the manual control mode, the average value of the plurality of the previous audio output levels associated with the type of audio output device to a predetermined audio output level; controlling (250, 280) the audio output device to transmit the audio output at the second audio output level when the average value of the plurality of the previous audio output levels is not greater than the predetermined audio output level; controlling (270, 280) the audio output device to transmit the audio output at a third audio output level when the average value of the plurality of the previous audio output levels is greater than the predetermined audio output level, wherein the first audio output level equals the average value of a plurality of previous audio output levels associated with the type of audio output device, wherein the third audio output level equals the predetermined audio output level, and wherein the audio output device is a wired or wireless audio output device, the audio output device being one of a set of audio output devices comprising at least a wired earphone, an internal speaker, a Bluetooth headset and an external speaker.