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

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

51自学网 2021-06-03 08:02:40
  C++
这篇教程C++ snd_seq_ev_clear函数代码示例写得很实用,希望能帮到您。

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

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

示例1: sendMessageNow

    void sendMessageNow (const MidiMessage& message)    {        if (message.getRawDataSize() > maxEventSize)        {            maxEventSize = message.getRawDataSize();            snd_midi_event_free (midiParser);            snd_midi_event_new (maxEventSize, &midiParser);        }        snd_seq_event_t event;        snd_seq_ev_clear (&event);        snd_midi_event_encode (midiParser,                               message.getRawData(),                               message.getRawDataSize(),                               &event);        snd_midi_event_reset_encode (midiParser);        snd_seq_ev_set_source (&event, 0);        snd_seq_ev_set_subs (&event);        snd_seq_ev_set_direct (&event);        snd_seq_event_output (seqHandle, &event);        snd_seq_drain_output (seqHandle);    }
开发者ID:GuillaumeLeNost,项目名称:ConvolutionFilter,代码行数:26,


示例2: Q_ASSERT

void MIDIDevice::feedBack(t_input_channel channel, t_input_value value){	/* MIDI devices can have only 128 notes or controllers */	if (channel < 128)	{		snd_seq_event_t ev;		MIDIInput* plugin;		plugin = static_cast<MIDIInput*> (parent());		Q_ASSERT(plugin != NULL);		Q_ASSERT(plugin->alsa() != NULL);		Q_ASSERT(m_address != NULL);		/* Setup an event structure */		snd_seq_ev_clear(&ev);		snd_seq_ev_set_dest(&ev, m_address->client, m_address->port);		snd_seq_ev_set_subs(&ev);		snd_seq_ev_set_direct(&ev);		/* Send control change, channel 1 (0) */		snd_seq_ev_set_controller(&ev, 0, channel, value >> 1);		snd_seq_event_output(plugin->alsa(), &ev);		snd_seq_drain_output(plugin->alsa());		/* Send note on/off, channel 1 (0) */		if (value == 0)			snd_seq_ev_set_noteoff(&ev, 0, channel, 0);		else			snd_seq_ev_set_noteon(&ev, 0, channel, value >> 1);		snd_seq_event_output(plugin->alsa(), &ev);		snd_seq_drain_output(plugin->alsa());	}
开发者ID:speakman,项目名称:qlc,代码行数:32,


示例3: stop_midireceiver

void stop_midireceiver (JackVST *jvst){	int err; 	snd_seq_event_t event;	snd_seq_t *seq2 = create_sequencer ("jfstquit", true);		jvst->midiquit = 1;		snd_seq_connect_to (seq2, 0, snd_seq_client_id (jvst->seq),0);	snd_seq_ev_clear      (&event);	snd_seq_ev_set_direct (&event);	snd_seq_ev_set_subs   (&event);	snd_seq_ev_set_source (&event, 0);	snd_seq_ev_set_controller (&event,1,0x80,50);		if ((err = snd_seq_event_output (seq2, &event)) < 0) {		fst_error ("cannot send stop event to midi thread: %s/n",			   snd_strerror (err));	}	snd_seq_drain_output (seq2);	snd_seq_close (seq2);	pthread_join (jvst->midi_thread,NULL);	snd_seq_close (jvst->seq);}
开发者ID:davidhalter-archive,项目名称:ardour,代码行数:25,


示例4: Func_NoteOn

static void Func_NoteOn( int channel, int key, int velocity ){    snd_seq_event_t ev;    snd_seq_ev_clear(&ev);    snd_seq_ev_set_noteon(&ev, channel, key, velocity);    sequence_event(&ev);}
开发者ID:JohnnyonFlame,项目名称:jfaudiolib,代码行数:7,


示例5: Func_PolyAftertouch

static void Func_PolyAftertouch( int channel, int key, int pressure ){    snd_seq_event_t ev;    snd_seq_ev_clear(&ev);    snd_seq_ev_set_keypress(&ev, channel, key, pressure);    sequence_event(&ev);}
开发者ID:JohnnyonFlame,项目名称:jfaudiolib,代码行数:7,


示例6: Q_ASSERT

void MIDIDevice::outputDMX(const QByteArray& universe){    MIDIOut* plugin = static_cast<MIDIOut*> (parent());    Q_ASSERT(plugin != NULL);    Q_ASSERT(plugin->alsa() != NULL);    Q_ASSERT(m_address != NULL);    /* Setup a common event structure for all values */    snd_seq_event_t ev;    snd_seq_ev_clear(&ev);    snd_seq_ev_set_dest(&ev, m_address->client, m_address->port);    snd_seq_ev_set_subs(&ev);    snd_seq_ev_set_direct(&ev);    /* Since MIDI devices can have only 128 real channels, we don't       attempt to write more than that */    for (unsigned char channel = 0; channel < MAX_MIDI_DMX_CHANNELS;            channel++)    {        /* Scale 0-255 to 0-127 */        char scaled = DMX2MIDI(universe[channel]);        /* Since MIDI is so slow, we only send values that are           	   actually changed. */        if (m_values[channel] == scaled)            continue;        /* Store the changed MIDI value */        m_values[channel] = scaled;        if (mode() == Note)        {            if (scaled == 0)            {                /* 0 is sent as a note off command */                snd_seq_ev_set_noteoff(&ev, midiChannel(),                                       channel, scaled);            }            else            {                /* 1-127 is sent as note on command */                snd_seq_ev_set_noteon(&ev, midiChannel(),                                      channel, scaled);            }            snd_seq_event_output(plugin->alsa(), &ev);        }        else        {            /* Control change */            snd_seq_ev_set_controller(&ev, midiChannel(),                                      channel, scaled);            snd_seq_event_output_buffer(plugin->alsa(), &ev);        }    }    /* Make sure that all values go to the MIDI endpoint */    snd_seq_drain_output(plugin->alsa());}
开发者ID:alexpaulzor,项目名称:qlc,代码行数:60,


示例7: note_on

static void note_on(int note, real_t power) {  snd_seq_event_t ev;  if (debug>1) 	fprintf(stderr, "midimatch: (%ld) note on:  note:%-3d p:%.2f name:%[email
C++ snd_soc_add_codec_controls函数代码示例
C++ snd_seq_drain_output函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。