AtmoConnection.cpp
资源名称:vlc-1.0.5.zip [点击查看]
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:1k
源码类别:
midi
开发平台:
Unix_Linux
- /*
- * AtmoConnection.cpp: generic/abstract class defining all methods for the
- * communication with the hardware
- *
- * See the README.txt file for copyright information and how to reach the author(s).
- *
- * $Id: f8878456c3f8f90e740e01c639efa9f68c86f227 $
- */
- #include "AtmoConnection.h"
- CAtmoConnection::CAtmoConnection(CAtmoConfig *cfg)
- {
- this->m_pAtmoConfig = cfg;
- if(cfg->getNumChannelAssignments()>0) {
- tChannelAssignment *ca = cfg->getChannelAssignment(0);
- for(int i=0;i<ATMO_NUM_CHANNELS;i++) {
- m_ChannelAssignment[i] = ca->mappings[i];
- }
- } else {
- for(int i=0;i<ATMO_NUM_CHANNELS;i++) {
- m_ChannelAssignment[i] = i;
- }
- }
- }
- void CAtmoConnection::SetChannelAssignment(tChannelAssignment *ca) {
- for(int i=0;i<ATMO_NUM_CHANNELS;i++) {
- m_ChannelAssignment[i] = ca->mappings[i];
- }
- }
- CAtmoConnection::~CAtmoConnection(void)
- {
- if(isOpen())
- CloseConnection();
- }