Is there any way to output audio signals through GPIO and is there any disadvantage with this way?
The audio jack channels (left and right) are provided by PWM driven GPIO (channel 0 by GPIO 12 or 18, and channel 1 by GPIO 13 or 19).
So if you connect appropriate circuitry to those GPIO you will get audio.
See BCM2835 ARM Peripherals for details on the GPIO and PWM peripheral.
EDITED TO ADD
On recent Pis the audio jack output is provided by PWM channels 0 and 1. PWM channel 0 is fed to GPIO40 which is connected to the (stereo) right channel, and PWM channel 1 is fed to GPIO45 which is connected to the (stereo) left channel.
These PWM channels may additionally be fed to user accessible GPIO.
PWM channel 0 may be routed to GPIO12 and GPIO18.
PWM channel 1 may be routed to GPIO13 and GPIO19.
You route PWM to a GPIO by setting a particular GPIO mode as follows:
- GPIO12 - set mode ALT0
- GPIO13 - set mode ALT0
- GPIO18 - set mode ALT5
- GPIO19 - set mode ALT5
See page 102 of the Broadcom spec reference above.
There are various ways of setting a GPIO mode.
E.g. pigs m 18 5 will set GPIO18 to mode ALT5.
Just as Joan's answer already suggests, the Pi's analog audio out is just that. Adafruit has an article describing this circuitry in detail for use with the Pi Zero (which comes without it), see here.