Just use libshout?
Repo: https://github.com/xiph/Icecast-libshout
Example: https://github.com/xiph/Icecast-libshout/blob/master/examples/nonblocking.c
Example LAME usage: https://stackoverflow.com/questions/2495420