SoundCardData.cpp 615 B

123456789101112131415161718192021222324252627282930
  1. #include "SoundCardData.h"
  2. SoundCardDataManager::~SoundCardDataManager()
  3. {
  4. }
  5. /* 设置声卡列表 */
  6. void SoundCardDataManager::setSoundCardInfo(std::map<std::string, SoundCardPCMInfo_t>& mapSoundInfo)
  7. {
  8. m_mapSoundCardInfo.clear();
  9. m_mapSoundCardInfo = mapSoundInfo;
  10. }
  11. /* 设置当前声卡 */
  12. bool SoundCardDataManager::setCurrentSoundCard(std::string strSoundCardName)
  13. {
  14. auto it = m_mapSoundCardInfo.find(strSoundCardName);
  15. if(it == m_mapSoundCardInfo.end())
  16. {
  17. return false;
  18. }
  19. m_currentSoundCardInfo = it->second;
  20. return true;
  21. }