Examples of Transmitter


Examples of de.sciss.meloncillo.transmitter.Transmitter

   */
  public boolean consumerBegin( RenderContext context, RenderSource source )
  throws IOException
  {
    final ConsumerContext  consc;
    Transmitter        trns;
    AudioTrail        at;
   
    consc      = new ConsumerContext();
    consc.edit    = new CompoundSessionObjEdit( this, context.getTransmitters(), Transmitter.OWNER_TRAJ,
                            null, null, "Filter" );
//    consc.bs    = new BlendSpan[ source.numTrns ];
    consc.as    = new AudioStake[ source.numTrns ];
    consc.bc    = root.getBlending()// XXX THREAD XXX
//    if( consc.bc != null ) consc.srcBuf = new float[ 2 ][ 4096 ];
    context.setOption( KEY_CONSC, consc );

    for( int trnsIdx = 0; trnsIdx < source.numTrns; trnsIdx++ ) {
      if( !source.trajRequest[ trnsIdx ]) continue;
     
      trns        = (Transmitter) context.getTransmitters().get( trnsIdx );
      at          = trns.getAudioTrail();
//      consc.bs[ trnsIdx ]  = at.beginOverwrite( context.getTimeSpan(), consc.bc, consc.edit );
      consc.as[ trnsIdx= at.alloc( context.getTimeSpan() );
    }
   
    return true;
View Full Code Here

Examples of de.sciss.meloncillo.transmitter.Transmitter

   *  the compound edit.
   */
  public boolean consumerFinish( RenderContext context, RenderSource source )
  throws IOException
  {
    Transmitter        trns;
    AudioTrail        at;
    int            trnsIdx;
    ConsumerContext      consc   = (ConsumerContext) context.getOption( KEY_CONSC );

    for( trnsIdx = 0; trnsIdx < source.numTrns; trnsIdx++ ) {
      if( !source.trajRequest[ trnsIdx ]) continue;

      trns        = (Transmitter) context.getTransmitters().get( trnsIdx );
      at          = trns.getAudioTrail();
      at.editBegin( consc.edit );
      at.editClear( this, consc.as[ trnsIdx].getSpan(), consc.edit );
      at.editAdd( this, consc.as[ trnsIdx], consc.edit );
      at.editEnd( consc.edit );
//      at.finishWrite( consc.bs[ trnsIdx], consc.edit );
View Full Code Here

Examples of de.sciss.meloncillo.transmitter.Transmitter

   */
  public boolean consumerRender( RenderContext context, RenderSource source )
  throws IOException
  {
    ConsumerContext      consc   = (ConsumerContext) context.getOption( KEY_CONSC );
    Transmitter        trns;
    AudioTrail        at;
    int            trnsIdx;

    for( trnsIdx = 0; trnsIdx < source.numTrns; trnsIdx++ ) {
      if( !source.trajRequest[ trnsIdx ]) continue;

      trns        = (Transmitter) context.getTransmitters().get( trnsIdx );
      at          = trns.getAudioTrail();
      if( consc.as[ trnsIdx ] == null ) {
        context.getHost().showMessage( JOptionPane.ERROR_MESSAGE,
          AbstractApplication.getApplication().getResourceString( "renderEarlyConsume" ));
        return false;
      }
View Full Code Here

Examples of javax.sound.midi.Transmitter

     * sequencer with a Transmitter-Receiver pair.
     */
    synthesizer = MidiSystem.getSynthesizer();
    synthesizer.open();
    Receiver synthReceiver = synthesizer.getReceiver();
    Transmitter seqTransmitter = sequencer.getTransmitter();
    seqTransmitter.setReceiver(synthReceiver);

    /*
     * To free system resources, it is recommended to close the synthesizer
     * and sequencer properly.
     *
 
View Full Code Here

Examples of javax.sound.midi.Transmitter

     * sequencer with a Transmitter-Receiver pair.
     */
    synthesizer = MidiSystem.getSynthesizer();
    synthesizer.open();
    Receiver synthReceiver = synthesizer.getReceiver();
    Transmitter seqTransmitter = sequencer.getTransmitter();
    seqTransmitter.setReceiver(synthReceiver);

    /*
     * To free system resources, it is recommended to close the synthesizer
     * and sequencer properly.
     *
 
View Full Code Here

Examples of javax.sound.midi.Transmitter

     *            The transmitter handle.
     * @return The transmitter.
     */
    private Transmitter resolveTransmitterHandle(final int handle)
    {
        final Transmitter transmitter = this.transmitterMap.get(handle);
        if (transmitter == null)
            throw new RuntimeException("No transmitter with handle " + handle +
                " found");
        return transmitter;
    }
View Full Code Here

Examples of javax.sound.midi.Transmitter

     */
    public int getTransmitter(final int deviceHandle)
        throws MidiUnavailableException
    {
        final MidiDevice device = resolveDeviceHandle(deviceHandle);
        final Transmitter transmitter = device.getTransmitter();
        final int transmitterHandle = System.identityHashCode(transmitter);
        this.transmitterMap.put(transmitterHandle, transmitter);
        return transmitterHandle;
    }
View Full Code Here

Examples of javax.sound.midi.Transmitter

     * @param transmitterHandle
     *            The transmitter handle to release.
     */
    public void closeTransmitter(final int transmitterHandle)
    {
        final Transmitter transmitter =
            resolveTransmitterHandle(transmitterHandle);
        transmitter.close();
        this.transmitterMap.remove(transmitterHandle);
    }
View Full Code Here

Examples of javax.sound.midi.Transmitter

     *            The handle of the receiver. 0 to unset.
     */
    public void setTransmitterReceiver(final int transmitterHandle,
        final int receiverHandle)
    {
        final Transmitter transmitter =
            resolveTransmitterHandle(transmitterHandle);
        final Receiver receiver =
            receiverHandle == 0 ? null : resolveReceiverHandle(receiverHandle);
        transmitter.setReceiver(receiver);
    }
View Full Code Here

Examples of javax.sound.midi.Transmitter

     *            The handle of the transmitter.
     * @return The handle of the receiver or 0 if none.
     */
    public int getTransmitterReceiver(final int transmitterHandle)
    {
        final Transmitter transmitter =
            resolveTransmitterHandle(transmitterHandle);
        final Receiver receiver = transmitter.getReceiver();
        return System.identityHashCode(receiver);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.