您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ Channel函数代码示例

51自学网 2021-06-01 20:10:01
  C++
这篇教程C++ Channel函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中Channel函数的典型用法代码示例。如果您正苦于以下问题:C++ Channel函数的具体用法?C++ Channel怎么用?C++ Channel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了Channel函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: caml_ml_flush_partial

CAMLprim value caml_ml_flush_partial(value vchannel){  CAMLparam1 (vchannel);  struct channel * channel = Channel(vchannel);  int res;  if (channel->fd == -1) CAMLreturn(Val_true);  Lock(channel);  res = caml_flush_partial(channel);  Unlock(channel);  CAMLreturn (Val_bool(res));}
开发者ID:bobzhang,项目名称:ocaml,代码行数:12,


示例2: caml_ml_output_partial

CAMLprim value caml_ml_output_partial(value vchannel, value buff, value start,                                      value length){  CAMLparam4 (vchannel, buff, start, length);  struct channel * channel = Channel(vchannel);  int res;  Lock(channel);  res = caml_putblock(channel, &Byte(buff, Long_val(start)), Long_val(length));  Unlock(channel);  CAMLreturn (Val_int(res));}
开发者ID:bobzhang,项目名称:ocaml,代码行数:12,


示例3: onAddChannelButtonPressed

void MainWindow::onAddChannelButtonPressed(){    if (m_session.isValid())    {        QString name = ui->channelNameEdit->text();        QString description = ui->channelDescriptionEdit->text();        QString url = ui->channelUrlEdit->text();        m_applyChannelQuery->setQuery(Channel(name,description,url),m_session);        m_applyChannelQuery->doRequest();    }}
开发者ID:4ukuta,项目名称:core,代码行数:12,


示例4: main

int main(void)  {    int i, j;    unsigned short CRC_Xmit;    unsigned short CRC_Recv;    int Detected_Count = 0;    int Okay_Count     = 0;    /* Initialize. */    for (i = 0; i < 1024; i++) {      Raw_Data[i] = (unsigned char)i;    }    CRC_Xmit = CRC_Clear();    Initialize_Noise(1.0e-5);    /* Compute the CRC checksum. */    for (i = 0; i < 1024; i++) {      CRC_Xmit = CRC_Update(CRC_Xmit, Raw_Data[i]);    }    CRC_Xmit = CRC_Finish(CRC_Xmit);    /* Now loop many times sending the block of data through the channel. */    for (i = 0; i < 1024; i++) {      CRC_Recv = CRC_Clear();      for (j = 0; j < 1024; j++) {        CRC_Recv = CRC_Update(CRC_Recv, Channel(Raw_Data[j]));      }      CRC_Recv = CRC_Update(CRC_Recv, Channel((CRC_Xmit & 0xFF00) >> 8));      CRC_Recv = CRC_Update(CRC_Recv, Channel(CRC_Xmit & 0x00FF));      if (CRC_Recv != 0) Detected_Count++;        else Okay_Count++;    }    printf("Blocks with detected errors: %d/n", Detected_Count);    printf("Blocks okay: %d/n", Okay_Count);    return 0;  }
开发者ID:pchapin,项目名称:spica,代码行数:40,


示例5: string2qstring

SensorDataSet SensorDB::ExecuteSQL_SelectFromSensorDataTable(std::string sqlcommand){    SensorDataSet ds;	ChannelList channelist;    int channel_num;    int datatype_id;    int operator_id;    int device_id;    int position_id;    int activity_id;    int activitybeginframe_id;    int activityendframe_id;    double samplerate;    QDateTime createtime;    if(db.isOpen()){        QSqlQuery query;        QString sqlcmd = string2qstring(sqlcommand);        if(query.exec(sqlcmd)){                while(query.next()){					datatype_id = query.value("DataTypeID").toInt();                    activity_id = query.value("ActivityID").toInt();                    device_id = query.value("DeviceID").toInt();                    operator_id = query.value("OperatorID").toInt();                    position_id = query.value("PositionID").toInt();                    activitybeginframe_id = query.value("ActivityBeginFrameID").toInt();                    activityendframe_id = query.value("ActivityEndFrameID").toInt();                    samplerate = query.value("SampleRate").toDouble();                    createtime = query.value("CreateTime").toDateTime();					channel_num = query.value("TotalChannelNum").toInt();					channelist.clear();					for(int i=1;i<=channel_num;i++){                        if(query.value(i).isNull()){                            break;                        }											string ch = "channel_"+int2string(i);												//qDebug() << query.value(string2qstring(ch.c_str())).toString();						channelist.push_back(Channel(query.value(string2qstring(ch.c_str())).toString().toStdString()));						//qDebug() << string2qstring((channelist[channelist.size()-1].ToString()));					}					ds.PushBackSensorData(SensorData(channelist,channel_num,datatype_id,operator_id,device_id,position_id,                                         activity_id,activitybeginframe_id,activityendframe_id, samplerate,createtime));                }        }        else{            qDebug()<<query.lastError();        }    }    else{        qDebug()<<"DataBase is not opened";    }    return ds;}
开发者ID:BloodyPudding,项目名称:SensorDB_API,代码行数:52,


示例6: stream_of_channel

/* converts a Caml channel to a C FILE* stream */static FILE * stream_of_channel(value chan, const char * mode) {    int des;    FILE * res ;    struct channel *c_chan = Channel(chan) ;    if(c_chan==NULL)        return NULL;    des = dup(c_chan->fd) ;    res = fdopen(des, mode) ;    if (des < 0 || res == NULL) {        caml_failwith("failed to duplicate caml channel");    }    return res ;}
开发者ID:aziem,项目名称:ocaml-buddy,代码行数:14,


示例7: caml_ml_input_int

CAMLprim value caml_ml_input_int(value vchannel){  CAMLparam1 (vchannel);  struct channel * channel = Channel(vchannel);  intnat i;  Lock(channel);  i = caml_getword(channel);  Unlock(channel);#ifdef ARCH_SIXTYFOUR  i = (i << 32) >> 32;          /* Force sign extension */#endif  CAMLreturn (Val_long(i));}
开发者ID:bobzhang,项目名称:ocaml,代码行数:14,


示例8: ForwardTransaction

 void OutgoingResourceLimiter::ForwardMessage(string_t type, uint160 hash) {     if (type == "tx")         return ForwardTransaction(hash);     string_t channel = Channel(type);     with_msg_as_instance_of_(type, hash,         if (channel == "trade")             flexnode.tradehandler.BroadcastMessage(msg);         else if (channel == "relay")             flexnode.relayhandler.BroadcastMessage(msg);         else if (channel == "deposit")             flexnode.deposit_handler.BroadcastMessage(msg);         ) }
开发者ID:peer-node,项目名称:flex,代码行数:14,


示例9: Channel

// returns a status message regarding the successful or unsuccesful//    creation of a channelstd::string IRCCommandHandler::createChannel() {  // CREATECHANNEL channelname username  std::string channel {arguments[0]};  std::string user    {arguments[1]};  std::string result;  if (channels.count(channel) || channel == "server") {    result = "Error: Channel '"+channel+"' already exists";  }  else {    channels.emplace(channel, Channel(channel));    channels.at(channel).addUser(user);    result = "Successfully created channel '"+channel+"'";  }  return result;}
开发者ID:FundCompXbee,项目名称:XBeeMessenger,代码行数:18,


示例10: VLOG

boost::system::error_code RtspService::createChannel(uint32_t uiChannelId, const std::string& sChannelName, const AudioChannelDescriptor& audioDescriptor){  VLOG(2) << "createChannel: " << uiChannelId;  boost::mutex::scoped_lock l(m_channelLock);  ChannelMap_t::iterator it = m_mChannels.find(uiChannelId);  if (it != m_mChannels.end())  {    return boost::system::error_code(boost::system::errc::file_exists, boost::system::get_generic_category());  }  else  {    m_qChannelsToBeAdded.push_back(Channel(uiChannelId, sChannelName, audioDescriptor));    return boost::system::error_code();  }  return boost::system::error_code();}
开发者ID:duongbaoduy,项目名称:LiveMediaExt,代码行数:16,


示例11: SimulateRead

    string SimulateRead(const SequencingParameters& p,                        const std::string& tpl,                        RandomNumberGenerator& rng)    {        std::string read;        read.reserve(tpl.length() * 2);        int pos = 0;        while (pos < (int)tpl.length())        {            char base = tpl[pos];            char prevBase = pos > 0 ? tpl[pos-1] : 'N';            int channel = Channel(base);            //            // Tabulate the different possible move probabilities, then choose one            //            bool canMerge =  base == prevBase;            vector<double> errorProbs = ErrorProbs(p, channel, canMerge);            int choice = rng.RandomChoice(errorProbs);            if (choice == (int) errorProbs.size() - 1) {  // Match                read.push_back(base);                pos++;            } else if (choice < 4) {                     // Insert                vector<double> insertProbs = vector<double>(errorProbs.begin(),                                                            errorProbs.begin() + 4);                int eChannel = rng.RandomChoice(insertProbs);                char eBase = "TGAC"[eChannel];                read.push_back(eBase);            } else if (choice == 4) {                   // Dark                pos++;            } else if (choice == 5) {                   // Miscall                read.push_back(rng.RandomBase());                pos++;            } else {                                   // Merge                assert (canMerge);                pos++;            }        }        return read;    }
开发者ID:evolvedmicrobe,项目名称:ConsensusCore,代码行数:47,


示例12: win_filedescr_of_channel

CAMLprim value win_filedescr_of_channel(value vchan){  CAMLparam1(vchan);  CAMLlocal1(fd);  struct channel * chan;  HANDLE h;  chan = Channel(vchan);  if (chan->fd == -1) uerror("descr_of_channel", Nothing);  h = (HANDLE) _get_osfhandle(chan->fd);  if (chan->flags & CHANNEL_FLAG_FROM_SOCKET)    fd = win_alloc_socket((SOCKET) h);  else    fd = win_alloc_handle(h);  CRT_fd_val(fd) = chan->fd;  CAMLreturn(fd);}
开发者ID:d5nguyenvan,项目名称:mirage,代码行数:17,


示例13: SetStatus

void TransportStreamFilter::SetStatus(bool On) {    cFilter::SetStatus(On);#if VDRVERSNUM <= 10327#error "Unfortunately, VDR versions up to 1.3.27 contain a bug that prevents this code from working properly. Please use VDR version 1.3.28 or later."#endif    //printf("TransportStreamFilter::SetStatus , status is %d, On is %d/n", status, On);    TransportStreamID currentTs=TransportStream(Channel()).GetTransportStreamID();    if (On) {        switch (status) {        case TransportStreamUnknown:            ts=currentTs;            status=Active;            AddFilterData();            break;        case Active:            break; // should not happen        case Inactive:        case OnOtherTransportStream:            if (currentTs == ts) {                status=Active;                AddFilterData();            } else {                status=OnOtherTransportStream;                OtherTransportStream(currentTs);            }            break;        case Deactivated:            break;        }    } else {        switch (status) {        case TransportStreamUnknown:            break;        case Active:            status=Inactive;            RemoveFilterData();            break;        case Inactive:        case OnOtherTransportStream:            break;        case Deactivated:            break;        }    }    //printf("TransportStreamFilter::SetStatus, leaving, status is %d/n", status);}
开发者ID:BackupTheBerlios,项目名称:mhpforvdr-svn,代码行数:46,


示例14: caml_ml_output

CAMLprim value caml_ml_output(value vchannel, value buff, value start,                              value length){  CAMLparam4 (vchannel, buff, start, length);  struct channel * channel = Channel(vchannel);  intnat pos = Long_val(start);  intnat len = Long_val(length);  Lock(channel);    while (len > 0) {      int written = caml_putblock(channel, &Byte(buff, pos), len);      pos += written;      len -= written;    }  Unlock(channel);  CAMLreturn (Val_unit);}
开发者ID:bobzhang,项目名称:ocaml,代码行数:17,


示例15: Channel

Channel Channel::downsampleEnergy(unsigned factor) const{	if(factor>0)	{		unsigned newSize=data.size()/factor;		std::vector<float> target=std::vector<float>(newSize);		float acc;		for(unsigned i=0,j=0;j<newSize;j++)		{			acc=0;			for(unsigned k=0;k<factor && i<data.size();k++)				acc+=sqr(data[i++]);			target[j]=sqrt(acc/factor);		}		return Channel(rate/factor,target);	} else		return *this;}
开发者ID:sritterbusch,项目名称:ospac,代码行数:18,


示例16: header

void ZFnEXR::saveCameraNZ(float* data, M44f mat, float fov, const char* filename, int width, int height){	Header header (width, height); 	header.insert ("fov", DoubleAttribute (fov)); 	header.insert ("cameraTransform", M44fAttribute (mat));	header.channels().insert ("R", Channel (FLOAT));		OutputFile file (filename, header); 	FrameBuffer frameBuffer;	frameBuffer.insert ("R", 						Slice (FLOAT, 							   (char *) data, 							   sizeof (*data) * 1, 							   sizeof (*data) * width)); 	file.setFrameBuffer (frameBuffer);              	file.writePixels (height);}
开发者ID:saggita,项目名称:makoto,代码行数:18,


示例17: LOG

Channel Channel::resampleTo(unsigned newRate) const{	unsigned newSize=(data.size()*newRate)/rate;	std::vector<float> target=std::vector<float>(newSize);	LOG(logDEBUG) << "Old rate "<< rate << " New Rate: " << newRate << std::endl;	LOG(logDEBUG) << "Old size " << data.size() << " New Size: " << newSize << std::endl;	unsigned oldSize=data.size();	// TODO: Only nearest "interpolation"...	for(unsigned i=0;i<newSize;i++)	{		int j=(long(i)*oldSize)/newSize;		target[i]=data[j];	}	LOG(logDEBUG) << "done"<< std::endl;	return Channel(newRate,target);}
开发者ID:sritterbusch,项目名称:ospac,代码行数:19,


示例18: caml_ml_close_channel

CAMLprim value caml_ml_close_channel(value vchannel){  int result;  /* For output channels, must have flushed before */  struct channel * channel = Channel(vchannel);  if (channel->fd != -1){    result = close(channel->fd);    channel->fd = -1;  }else{    result = 0;  }  /* Ensure that every read or write on the channel will cause an     immediate caml_flush_partial or caml_refill, thus raising a Sys_error     exception */  channel->curr = channel->max = channel->end;  if (result == -1) caml_sys_error (NO_ARG);  return Val_unit;}
开发者ID:joechenq,项目名称:multi-script,代码行数:19,


示例19: Channel

bool Box::createdChannel(const string& name){	bool found = false;	for (int i = 0; i < channels.size(); i++)	if (channels[i].getName() == name)	{		found = true;		break;	}	if (found)		return false;	else	{	Channel ctemp = Channel(name);	this->channels.push_back(ctemp);	sort(channels.begin(), channels.end());	return true;	}}
开发者ID:Nunommpinto,项目名称:Prog,代码行数:20,


示例20: ml_gsl_monte_vegas_set_params

CAMLprim value ml_gsl_monte_vegas_set_params(value state, value params){    gsl_monte_vegas_state *s = GSLVEGASSTATE_VAL(state);    s->alpha      = Double_val(Field(params, 0));    s->iterations = Int_val(Field(params, 1));    s->stage      = Int_val(Field(params, 2));    s->mode       = Int_val(Field(params, 3)) - 1;    s->verbose    = Int_val(Field(params, 4));    {        value vchan = Field(params, 5);        if(Is_block(vchan)) {            struct channel *chan=Channel(Field(vchan, 0));            if(s->ostream != stdout && s->ostream != stderr)                fclose(s->ostream);            flush(chan);            s->ostream = fdopen(dup(chan->fd), "w");            GSLVEGASSTREAM_VAL(state) = vchan;        }    }    return Val_unit;}
开发者ID:oandrieu,项目名称:ocamlgsl,代码行数:21,


示例21: Update

void ModuleTouch::Update(Stream* stream) {	bool send = false;	for (int n = 0; n < 4; n++) {		bool state = m_buttons[n].IsPressed();		if (m_prevStates[n] != state) {			m_prevStates[n] = state;			send = true;		}	}	if (send) {		stream->print("u ");		stream->print(Channel());		stream->print("/");		stream->print(Name());		stream->print(m_prevStates[0] ? " 1," : " 0,");		stream->print(m_prevStates[1] ? "1," : "0,");		stream->print(m_prevStates[2] ? "1," : "0,");		stream->print(m_prevStates[3] ? "1/r/n" : "0/r/n");	}}
开发者ID:simulatedsimian,项目名称:arduino_flotilla_dummy,代码行数:22,


示例22: INFO_PF

// Add a channel to the timer with a given periodint MuxTimer::add_channel(long period){  // Check if this period is already registered  for (Channel& channel : getChannels())  {    if (channel.period == period)    {      // Timer fot his period has already been registered, return the associated id      INFO_PF("Timer channel with %u ms period already registered", period);      // Return the associated id      return channel.id;    }  }  // Check if the timer is not currently running  if (getStatus())  {    // Dump  a log    ERROR_LG("Timer cannot add new channel in timer, currently running");    // Return negative result    return -1;  }  else  {    // Dump  a log    INFO_PF("Timer, add new channel to timer with %u ms period", period);    // Get the new id    int id = getChannels().size() + 1;    // Add a new channel to this timer    getChannels().push_back(Channel(id, period));    // Return new channel id    return id;  }}
开发者ID:nikunn,项目名称:pinion,代码行数:40,


示例23: TEST

TEST(Recording_test, constructors){    Recording rec0;    EXPECT_EQ( rec0.size(), 0 );    std::vector<Section> sec_list(16, Section(32768));    Channel ch(sec_list);    Recording rec1(ch);    EXPECT_EQ( rec1.size(), 1 );    EXPECT_EQ( rec1[0].size(), 16 );    EXPECT_EQ( rec1[0][0].size(), 32768 );    std::vector<Channel> ch_list(4, Channel(16, 32768));    Recording rec2(ch_list);    EXPECT_EQ( rec2.size(), 4 );    EXPECT_EQ( rec2[rec2.size()-1].size(), 16 );    EXPECT_EQ( rec2[rec2.size()-1][rec2[rec2.size()-1].size()-1].size(), 32768 );    Recording rec3(4, 16, 32768);    EXPECT_EQ( rec3.size(), 4 );    EXPECT_EQ( rec3[rec3.size()-1].size(), 16 );    EXPECT_EQ( rec3[rec3.size()-1][rec3[rec3.size()-1].size()-1].size(), 32768 );}
开发者ID:SergiiRv,项目名称:stimfit,代码行数:24,


示例24: operator

 void operator () (Channel c) const {     // @todo: need to do a “channel_convert” too, in case the channel types aren't the same?     get_color (dst_, Channel()) = channel_multiply(get_color(src_,Channel()), alpha_or_max(src_)); }
开发者ID:mechacrash,项目名称:raindrop,代码行数:4,


示例25: assert

void EXRImageFileWriter::write(    const char*             filename,    const ICanvas&          image,    const ImageAttributes&  image_attributes){    try    {        // Retrieve canvas properties.        const CanvasProperties& props = image.properties();        // todo: lift this limitation.        assert(props.m_channel_count <= 4);        // Figure out the pixel type, based on the pixel format of the image.        PixelType pixel_type = FLOAT;        switch (props.m_pixel_format)        {        case PixelFormatUInt32:            pixel_type = UINT;            break;        case PixelFormatHalf:            pixel_type = HALF;            break;        case PixelFormatFloat:            pixel_type = FLOAT;            break;        default:            throw ExceptionUnsupportedImageFormat();        }        // Construct TileDescription object.        const TileDescription tile_desc(            static_cast<unsigned int>(props.m_tile_width),            static_cast<unsigned int>(props.m_tile_height),            ONE_LEVEL);        // Construct ChannelList object.        ChannelList channels;        for (size_t c = 0; c < props.m_channel_count; ++c)            channels.insert(ChannelName[c], Channel(pixel_type));        // Construct Header object.        Header header(            static_cast<int>(props.m_canvas_width),            static_cast<int>(props.m_canvas_height));        header.setTileDescription(tile_desc);        header.channels() = channels;        // Add image attributes to the Header object.        add_attributes(image_attributes, header);        // Create the output file.        TiledOutputFile file(filename, header, m_thread_count);        // Write tiles.        for (size_t y = 0; y < props.m_tile_count_y; ++y)        {            for (size_t x = 0; x < props.m_tile_count_x; ++x)            {                const int ix              = static_cast<int>(x);                const int iy              = static_cast<int>(y);                const Box2i range         = file.dataWindowForTile(ix, iy);                const Tile& tile          = image.tile(x, y);                const size_t channel_size = Pixel::size(tile.get_pixel_format());                const size_t stride_x     = channel_size * props.m_channel_count;                const size_t stride_y     = stride_x * tile.get_width();                const size_t tile_origin  = range.min.x * stride_x + range.min.y * stride_y;                const char* tile_base     = reinterpret_cast<const char*>(tile.pixel(0, 0)) - tile_origin;                // Construct FrameBuffer object.                FrameBuffer framebuffer;                for (size_t c = 0; c < props.m_channel_count; ++c)                {                    const char* base = tile_base + c * channel_size;                    framebuffer.insert(                        ChannelName[c],                        Slice(                            pixel_type,                            const_cast<char*>(base),                            stride_x,                            stride_y));                }                // Write tile.                file.setFrameBuffer(framebuffer);                file.writeTile(ix, iy);            }        }    }    catch (const BaseExc& e)    {        // I/O error.        throw ExceptionIOError(e.what());    }}
开发者ID:Len3d,项目名称:appleseed,代码行数:95,


示例26: ColorSpace

YUVCS::YUVCS(ColorSpace::Identifier id) : ColorSpace(id){    addChannel(Channel(Channel::YUV_Y, new YFilter()));    addChannel(Channel(Channel::YUV_U, new UFilter()));    addChannel(Channel(Channel::YUV_V, new VFilter()));}
开发者ID:einzige,项目名称:Multichannel-noise-generator,代码行数:6,


示例27: Channel

Channel JsonSerializer::getChannel() const{    return m_channels.isEmpty() ? Channel() : m_channels.at(0);}
开发者ID:h0st,项目名称:core,代码行数:4,


示例28: QSizeF

QSizeF GChannelGraphicsItem::sizeHint( Qt::SizeHint which, const QSizeF & constraint /*= QSizeF() */ ) const{	QSizeF sizeToReturn(Channel()->Sequence()->Length(), CHANNEL_GRAPHICS_ITEM_VERTICAL_SIZE);	return sizeToReturn;}
开发者ID:GaelReinaudi,项目名称:LabExe,代码行数:5,


示例29: caml_ml_pos_in_64

CAMLprim value caml_ml_pos_in_64(value vchannel){  return Val_file_offset(caml_pos_in(Channel(vchannel)));}
开发者ID:bobzhang,项目名称:ocaml,代码行数:4,


示例30: Channel

// The CALLER of this method must ensure that the status byte's MIDI Command matches!!!bool	CAAUMIDIMap::MIDI_Matches (UInt8 inChannel, UInt8 inData1, UInt8 inData2, Float32 &outLinear) const{	// see if the channels match first	SInt8 chan = Channel();	// channel matches (if chan is less than zero, "Any Channel" flag is set)	if (chan >= 0 && chan != inChannel)		return false;	// match the special cases first	if (IsKeyEvent()) {		// we're using this key event as an on/off type switch		if (IsBipolar()) {			if (IsKeyPressure()){				if (IsBipolar_OnValue()) {					if (inData2 > 63) {						outLinear = 1;						return true;					}				} else {					if (inData2 < 64) {						outLinear = 0;						return true;					}				}				return false;			}			else {				if (IsBipolar_OnValue()) {					if (inData1 > 63) {						outLinear = 1;						return true;					}				} else {					if (inData1 < 64) {						outLinear = 0;						return true;					}				}				return false;			}		}		if (IsAnyNote()) {// not quite sure how to interpret this...			if (IsKeyPressure())				outLinear = inData2 / 127.0;			else				outLinear = inData1 / 127.0;			return true;		}		if (mData1 == inData1) {			if (IsKeyPressure())				outLinear = inData2 / 127.0;			else				outLinear = 1;			return true;		}		return false;	}	else if (IsControlChange()) {		// controller ID matches		if (mData1 == inData1) {			if (IsBipolar()) {				if (IsBipolar_OnValue()) {					if (inData2 > 63) {						outLinear = 1;						return true;					}				} else {					if (inData2 < 64) {						outLinear = 0;						return true;					}				}				return false;			}			//printf("this in midi matches %X with ", this); 			outLinear = inData2 / 127.; 			return true;		}		return false;	}			// this just matches on the patch change value itself...	if (IsPatchChange()) {		if (mData1 == inData1) {			outLinear = 1;			return true;		}		return false;	}	// finally, for the other two, just check the bi-polar matching conditions	// pitch bend and after touch	if (IsBipolar()) {		if (IsBipolar_OnValue()) {			if (inData1 > 63) {				outLinear = 1;				return true;			}//.........这里部分代码省略.........
开发者ID:Bariyard,项目名称:BariInstrument,代码行数:101,



注:本文中的Channel函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CharGetDatum函数代码示例
C++ Changed函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。