Creates a new Mixer for playback
@since 01.07.2006
@return
492141
private Mixer createNewMixer()
	{
		Mixer mixer = currentContainer.createNewMixer();
		if (mixer!=null)
		{
			mixer.setVolume(initialVolume);
		}
		return mixer;
	}
446638
public static <RESULT> JSONComposer<RESULT> streamComposer(int features,
            JsonGenerator gen, boolean closeGenerator)
    {
        return new JSONComposer<RESULT>(features, gen, closeGenerator);
    }
968670
private void doStartPlaying()
	{
		if (currentContainer!=null)
		{
			doStopPlaying();
			if (currentContainer instanceof ModContainer)
			{
				System.out.println(((ModContainer) currentContainer).getCurrentMod().toString());
			}
			Mixer mixer = createNewMixer();
			mixer.setExportFile(wavFileName);
			playerThread = new PlayThread(mixer, this);
			playerThread.start();
		}
	}
1148248
public DefaultCacheEventListenerConfiguration build() {
    DefaultCacheEventListenerConfiguration defaultCacheEventListenerConfiguration;
    if (this.listenerClass != null) {
      defaultCacheEventListenerConfiguration = new DefaultCacheEventListenerConfiguration(this.eventsToFireOn, this.listenerClass, this.listenerArguments);
    } else {
      defaultCacheEventListenerConfiguration = new DefaultCacheEventListenerConfiguration(this.eventsToFireOn, this.listenerInstance);
    }
    if (eventOrdering != null) {
      defaultCacheEventListenerConfiguration.setEventOrderingMode(this.eventOrdering);
    }
    if (eventFiringMode != null) {
      defaultCacheEventListenerConfiguration.setEventFiringMode(this.eventFiringMode);
    }
    return defaultCacheEventListenerConfiguration;
  }
1081120
protected Channel createChannel() throws IOException {
        LOGGER.debug("Creating channel");
        Connection connection = connectionFactory.newConnection();
        Channel channel = connection.createChannel();
        LOGGER.debug("Created channel");
        return channel;
    }
730470
def _create(self):
        """"""
        from samplerate.lowlevel import ffi, src_callback_new, src_delete
        from samplerate.exceptions import ResamplingError

        state, handle, error = src_callback_new(
            self._callback, self._converter_type.value, self._channels)
        if error != 0:
            raise ResamplingError(error)
        self._state = ffi.gc(state, src_delete)
        self._handle = handle
595692
static RequestCreator<JmxVersionRequest> newCreator() {
        return new RequestCreator<JmxVersionRequest>() {
            /** {@inheritDoc} */
            public JmxVersionRequest create(Stack<String> pStack, ProcessingParameters pParams) throws MalformedObjectNameException {
                return new JmxVersionRequest(pParams);
            }

            /** {@inheritDoc} */
            public JmxVersionRequest create(Map<String, ?> requestMap, ProcessingParameters pParams)
                    throws MalformedObjectNameException {
                return new JmxVersionRequest(requestMap,pParams);
            }
        };
    }
1215387
public T newProxy() {
		Object proxy = Proxy.newProxyInstance(classLoader, exportInterfaces, this);
		return clazz.cast(proxy);
	}
374315
@Override
  public Compressor createCompressor() {
    if (!isNativeCodeLoaded()) {
      throw new RuntimeException("native lz4 library not available");
    }
    int bufferSize = conf.getInt(
        IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_KEY,
        IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_DEFAULT);
    System.out.println("Create Lz4hc codec");
    return new Lz4Compressor(bufferSize, true);
  }
74186
@Override
    public StackableChainingListener createChainingListenerInstance()
    {
        XWikiSyntaxChainingRenderer renderer = new XWikiSyntaxChainingRenderer(getListenerChain(),
            this.linkReferenceSerializer, this.imageReferenceSerializer);
        renderer.setPrinter(getPrinter());
        return renderer;
    }
765409
function create()
    {
        if (!getenv('COMPOSER_HOME')) {
            putenv('COMPOSER_HOME=' . $this->directoryList->getPath(DirectoryList::COMPOSER_HOME));
        }
        return \Composer\Factory::create(
            new BufferIO(),
            $this->composerJsonFinder->findComposerJson()
        );
    }
481643
public ChannelManagementSyncClient build() {
        final Builder okHttpClientBuilder = new Builder();

        okHttpClientBuilder
                .addInterceptor(buildAuthenticationInterceptor(channelTokenSupplier))
                .addInterceptor(buildLoggingInterceptor());

        final OkHttpClient okHttpClient = okHttpClientBuilder.build();

        final Retrofit.Builder retrofitBuilder = createDefaultRetrofitBuilder();

        retrofitBuilder.client(okHttpClient);
        retrofitBuilder.baseUrl(apiEndPoint.toString());
        final Retrofit retrofit = retrofitBuilder.build();

        final ChannelManagementClientRetrofitIface retrofitIface =
                retrofit.create(ChannelManagementClientRetrofitIface.class);
        return ChannelManagementSyncClientImpl.of(retrofitIface);
    }
166065
public IDLProxyObject newInstnace() {
        try {
            Object object = cls.newInstance();
            return new IDLProxyObject(codec, object, cls);
        } catch (Exception e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
1057130
static public ContentHandleFactory newFactory() {
    return new ContentHandleFactory() {
      @Override
      public Class<?>[] getHandledClasses() {
        return new Class<?>[]{ String.class };
      }
      @Override
      public boolean isHandled(Class<?> type) {
        return String.class.isAssignableFrom(type);
      }
      @Override
      public <C> ContentHandle<C> newHandle(Class<C> type) {
        @SuppressWarnings("unchecked")
        ContentHandle<C> handle = isHandled(type) ?
                                  (ContentHandle<C>) new StringHandle() : null;
        return handle;
      }
    };
  }
220248
private static Playback createPlayback(Media media, Align alignment, int volume) throws IOException
    {
        final AudioInputStream input = openStream(media);
        final SourceDataLine dataLine = getDataLine(input);
        dataLine.start();
        updateAlignment(dataLine, alignment);
        updateVolume(dataLine, volume);

        return new Playback(input, dataLine);
    }
990625
static public function create()
    {
        $t = new static();

        $t->registerService(new Service\Youtube());
        $t->registerService(new Service\Dailymotion());
        $t->registerService(new Service\Vimeo());
        $t->registerService(new Service\Spotify());
        $t->registerService(new Service\SoundCloud());

        return $t;
    }
691710
public int mixIntoBuffer(final int[] leftBuffer, final int[] rightBuffer, final int count)
	{
//		try
//		{
			if (modFinished) return -1;
			
			int bufferIdx = 0; // Index into the buffer
			int endIndex = samplePerTicks; // where !will! we be after next mixing (will this still fit?!)
			final int maxEndIndex = count - Helpers.VOL_RAMP_LEN;
			if (maxEndIndex < samplePerTicks) throw new RuntimeException("The mixing buffer is too small. Minimum are " + samplePerTicks + " sample frames");

			while (endIndex < maxEndIndex && !modFinished)
			{
				for (int c = 0; c < maxChannels; c++)
				{
//					if (c!=1) continue; //TODO: COMMENT THIS OUT AGAIN IF FINISHED WITH DEBUGGING
					
					ChannelMemory actMemo = channelMemory[c];

					// Mix this channel?
					if (!actMemo.muted && isChannelActive(actMemo))
					{
						// fill in those samples
						mixChannelIntoBuffers(leftBuffer, rightBuffer, bufferIdx, endIndex, actMemo);
						
						// and get the ramp data for interweaving, if there is something left
						if (!actMemo.instrumentFinished) fillRampDataIntoBuffers(nvRampL, nvRampR, actMemo);
					}
				}
	
				// Now Interweave with last ticks ramp buffer data
				for (int n=0; n<Helpers.VOL_RAMP_LEN; n++)
				{
					final int difFade = Helpers.VOL_RAMP_LEN - n;
					
					leftBuffer [bufferIdx + n] = ((leftBuffer [bufferIdx + n] * n) + (vRampL[n] * difFade))>>Helpers.VOL_RAMP_FRAC;
					rightBuffer[bufferIdx + n] = ((rightBuffer[bufferIdx + n] * n) + (vRampR[n] * difFade))>>Helpers.VOL_RAMP_FRAC;
					
					// and copy in one step...
					vRampL[n] = nvRampL[n]; vRampR[n] = nvRampR[n];
					nvRampL[n] = nvRampR[n] = 0;
				}
	
				bufferIdx += samplePerTicks;
				modFinished = doTickEvents();
				endIndex += samplePerTicks; // tickevents can change samplePerTicks
			}
	
			return bufferIdx;
//		}
//		catch (Throwable ex)
//		{
//			//This is only needed for debugging porposes during playback, so
//			//we know, where the error happend...
//			throw new RuntimeException(this.getClass().getName() + " " + currentPatternIndex + "[" + currentRow + "]", ex);
//		}
	}