Package games.stendhal.client.sound.system.processors

Examples of games.stendhal.client.sound.system.processors.ToneGenerator$Tone


   * Test signal resampling using the sound generator.
   */
  @Test
  public final void testGenerated() {
    // generate a 1 kHz signal
    final ToneGenerator gen = new ToneGenerator(1, 44100, 10*44100);
    gen.addTone(new ToneGenerator.Tone(1.f, 1000.f));
    final ToneGeneratorTest.Receiver rec = new ToneGeneratorTest.Receiver(gen);
    rec.request();

    assertEquals("check output buffer size", 10*44100, rec._data.length);

View Full Code Here


   * Test empty signal generation.
   */
  @Test
  public final void testNoSignal() {
    // generate a signal without adding a Tone
    final ToneGenerator gen = new ToneGenerator(1, 44100, 10*44100);
    final Receiver rec = new Receiver(gen);
    rec.request();

    assertEquals(10*44100, rec._data.length);
    assertEquals(10*44100, rec._frames);
View Full Code Here

   * Test 1 channel signal generation.
   */
  @Test
  public final void test1Sine1kHz() {
    // generate a 1 kHz signal
    final ToneGenerator gen = new ToneGenerator(1, 44100, 10*44100);
    gen.addTone(new ToneGenerator.Tone(1.f, 1000.f));
    final Receiver rec = new Receiver(gen);
    rec.request();

    assertEquals(10*44100, rec._data.length);
    assertEquals(10*44100, rec._frames);
View Full Code Here

   * Test 2 channel signal generation.
   */
  @Test
  public final void test2Sine1kHz() {
    // generate a two channel 1 kHz signal
    final ToneGenerator gen = new ToneGenerator(2, 44100, 10*44100);
    gen.addTone(new ToneGenerator.Tone(1.f, 1000.f));
    final Receiver rec = new Receiver(gen);
    rec.request();

    assertEquals(2*10*44100, rec._data.length);
    assertEquals(10*44100, rec._frames);
View Full Code Here

TOP

Related Classes of games.stendhal.client.sound.system.processors.ToneGenerator$Tone

Copyright © 2018 www.massapicom. 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.