123456789101112131415161718192021222324252627282930313233343536 |
- //
- // RPRedAudio.hpp
- // red_protocol
- //
- // Created by 杜家兑 on 2024/3/1.
- //
- #ifndef RPRedAudio_hpp
- #define RPRedAudio_hpp
- #include <stdio.h>
- #include "RPAudioProtocol.h"
- NS_RP_BEGIN
- class RedAudio final {
- public:
- static RedAudio* getInstance();
-
- void setAudioProtocol(AudioProtocol* audioProtocol);
-
- /// 播放音频接口
- void playAudio(const std::string& str);
- void playAudio(const std::string& str1, const std::string& str2);
- void playAudio(const std::string& str1, const std::string& str2, bool force, const std::vector<AudioParam>& audioParams);
- private:
- RedAudio() = default;
- ~RedAudio() = default;
- private:
- AudioProtocol* _audioProtocol = nullptr;
- };
- NS_RP_END
- #endif /* RPRedAudio_hpp */
|