Hopefully, this should make it clear how to use the API for setting volume for speakers, headphones, or line-level output.