Playing an Audio File
This section describes how to play a local audio file in AAC format. Connect a headset or sound box to the audio output port of the HiLens Kit device. You can hear the sound calling this API.
- API calling
HiLensEC PlayAacFile(const std::string filePath, int vol)
- Parameter description
Table 1 Parameters Parameter
Description
filePath
Absolute path of the local audio file. Chinese characters are not supported.
vol
Volume of the audio to be played. The value range is [-121, 6].
This API and the API in Constructing Audio Collectors cannot be called at the same time.
- Return Value
If the return value is 0, the operation is successful. Otherwise, the operation fails. Refer to Error Codes for details about the failure response parameters.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot