While using macOS I found that the microphone I had plugged into the headphone port was not working. After researching this issue, it turns out that the culprit was the coreadudiod
daemon. In order to get your microphone to work again do the following:
In the terminal kill the coreaudiod
daemon:
sudo pkill coreaudio
macOS will automatically restart it. Go to System Preferences and then Sound. Once you are in the Sound app, go to Input and adjust your microphone volume to the level desired and test it. If you see the bars changing color, your microphone is working.