Package javax.media.format

Examples of javax.media.format.AudioFormat


  {
    for (int i = 0; i < 256; ++i)
    {
      byte[] inputBufferData = new byte[] {(byte) i};

      testnew AudioFormat(AudioFormat.LINEAR, 4000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 4000.0, Format.byteArray),
          new AudioFormat(AudioFormat.LINEAR, 4000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 4000.0, Format.byteArray),
          inputBufferData,
          inputBufferData
          );
    }
  }
View Full Code Here


  {
    for (int i = 0; i < 256; ++i)
    {
      byte[] inputBufferData = new byte[] {0, (byte) i};

      testnew AudioFormat(AudioFormat.LINEAR, 4000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 4000.0, Format.byteArray),
          new AudioFormat(AudioFormat.LINEAR, 4000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 4000.0, Format.byteArray),
          inputBufferData,
          inputBufferData
          );
    }
  }
View Full Code Here

        for (int m = 0; m < signedValues.length; ++m)
        {
          final int signed = signedValues[m];
         
          testnew AudioFormat(AudioFormat.LINEAR, 4000.0, 16, 1, endian, signed, 16, 4000.0, Format.byteArray),
              new AudioFormat(AudioFormat.LINEAR, 4000.0, 16, 1, endian, signed, 16, 4000.0, Format.byteArray),
              inputBufferData,
              inputBufferData
              );
        }
      }
View Full Code Here

          final int endian = endianValues[k];
          for (int m = 0; m < signedValues.length; ++m)
          {
            final int signed = signedValues[m];
         
            test(new AudioFormat(AudioFormat.LINEAR, 4000.0, sampleSizeInBits, 1, endian, signed, sampleSizeInBits, 4000.0, Format.byteArray),
              new AudioFormat(AudioFormat.LINEAR, 4000.0, sampleSizeInBits, 1, endian, signed, sampleSizeInBits, 4000.0, Format.byteArray),
              inputBufferData,
              inputBufferData
              );
          }
        }
View Full Code Here

         
        for (int m = 0; m < signedValues.length; ++m)
        {
          final int signed = signedValues[m];
         
          testnew AudioFormat(AudioFormat.LINEAR, 4000.0, 16, 1, endian, signed, 16, 4000.0, Format.byteArray),
              new AudioFormat(AudioFormat.LINEAR, 4000.0, 8, 1, endian, signed, 8, 4000.0, Format.byteArray),
              inputBufferData,
              outputBufferTargetData
              );
        }
      }
View Full Code Here

         
        for (int m = 0; m < signedValues.length; ++m)
        {
          final int signed = signedValues[m];
         
          testnew AudioFormat(AudioFormat.LINEAR, 4000.0, 8, 1, endian, signed, 8, 4000.0, Format.byteArray),
              new AudioFormat(AudioFormat.LINEAR, 4000.0, 16, 1, endian, signed, 16, 4000.0, Format.byteArray),
              inputBufferData,
              outputBufferTargetData
              );
        }
      }
View Full Code Here

    for (int i = 0; i < 256; ++i)
    {
      byte[] inputBufferData = new byte[] {(byte) i, (byte) i, 0, 2};
      byte[] targetOutputBufferData = new byte[] {(byte) i, 1};

      testnew AudioFormat(AudioFormat.LINEAR, 8000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 8000.0, Format.byteArray),
          new AudioFormat(AudioFormat.LINEAR, 4000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 4000.0, Format.byteArray),
          inputBufferData,
          targetOutputBufferData
          );
    }
  }
View Full Code Here

    for (int i = 0; i < 256; ++i)
    {
      byte[] inputBufferData = new byte[] {(byte) i, 0, 2};
      byte[] targetOutputBufferData = new byte[] {(byte) i, (byte) i, 0, 0, 2, 2};

      testnew AudioFormat(AudioFormat.LINEAR, 4000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 4000.0, Format.byteArray),
          new AudioFormat(AudioFormat.LINEAR, 8000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 8000.0, Format.byteArray),
          inputBufferData,
          targetOutputBufferData
          );
    }
  }
View Full Code Here

      // (2 + (4/2)) / 1.5 = 2.67 = 3 rounded
      // ((4/2) + 6) / 1.5 = 5.33 = 5 rounded
      // (8 + (10/2)) / 1.5 = 8.67 = 9 rounded
      // (10/2) + 12 / 1.5 = 11.33 = 11 rounded
     
      testnew AudioFormat(AudioFormat.LINEAR, 3000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 3000.0, Format.byteArray),
          new AudioFormat(AudioFormat.LINEAR, 2000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 2000.0, Format.byteArray),
          inputBufferData,
          targetOutputBufferData
          );
    }
  }
View Full Code Here

      // (2 + (4/2)) / 1.5 = 2.67 = 3 rounded
      // ((4/2) + 6) / 1.5 = 5.33 = 5 rounded
      // (8 + (10/2)) / 1.5 = 8.67 = 9 rounded
      // (10/2) + 12 / 1.5 = 11.33 = 11 rounded
     
      testnew AudioFormat(AudioFormat.LINEAR, 3000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 3000.0, Format.byteArray),
          new AudioFormat(AudioFormat.LINEAR, 2000.0, 8, 1, -1, AudioFormat.SIGNED, 8, 2000.0, Format.byteArray),
          inputBufferData,
          targetOutputBufferData
          );
    }
  }
View Full Code Here

TOP

Related Classes of javax.media.format.AudioFormat

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.