Package vavi.sound.mobile

Examples of vavi.sound.mobile.AudioEngine$Data


     *
     * @return Contentinfo with contentType Data.
     */
    private ContentInfo makeData(SafeContents safe) throws IOException,
      ASN1Exception {
  Data data = null;
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  DEREncoder encoder = new DEREncoder(baos);
  safe.encode(encoder);
  data = new Data(baos.toByteArray());
  baos.close();
  ContentInfo cInfo = new ContentInfo(data);
  return cInfo;
    }
View Full Code Here


  // check version before any other operations
  Request request = new Request (display, major_opcode, 0, 3);
  request.write4 (CLIENT_MAJOR_VERSION);
  request.write4 (CLIENT_MINOR_VERSION);

  Data reply = display.read_reply (request);
  server_major_version = reply.read4 (8);
  server_minor_version = reply.read4 (12);
    }
View Full Code Here

     */
    public long getOverlayWindow (Window win) {
  Request request = new Request (display, major_opcode, 7, 2);
  request.write4 (win.id);

  Data reply = display.read_reply (request);
  if (reply == null) {
      return -1;
  }

  return reply.read4(8);
    }
View Full Code Here

    // check version before any other operations
    Request request = new Request (display, major_opcode, 0, 3);
    request.write4 (CLIENT_MAJOR_VERSION);
    request.write4 (CLIENT_MINOR_VERSION);
 
    Data reply = display.read_reply (request);
    server_major_version = reply.read2 (8);
    server_minor_version = reply.read2 (10);
  }
View Full Code Here

      Configuration configuration = project.getConfiguration();

      if (configuration != null)
      {
        Data data = configuration.getData();

        if (data != null)
        {
          ModuleDependencies moduleDependencies = data.getModuleDependencies();

          if (moduleDependencies != null)
          {
            dependencies = moduleDependencies.getDependency();
          }
View Full Code Here

        // ainf
        events.add(new MfiEvent(new AinfMessage(false, 1), 0l));

        // audio data
        AudioEngine audioEngine = Factory.getAudioEngine(0x80); // TODO 0x80 is not defined in spec
        byte[] adpcm = audioEngine.encode(bits, channels, data);
        AdpmMessage adpmMessage = new AdpmMessage(sampleRate / 1000, bits, false, channels);
        AudioDataMessage audioData = new AudioDataMessage(0x80, 0x00, adpmMessage); // TODO 0x80 is not defined in spec
        audioData.setData(adpcm);
        events.add(new MfiEvent(audioData, 0l));
View Full Code Here

        // ainf
        events.add(new MfiEvent(new AinfMessage(false, 1, new AinfMessage.AudioInfo(0x81, new byte[] { 0x10, 0x08, 0x10, 0x10, 0x08, 0x10 })), 0l));

        // audio data
        AudioEngine audioEngine = Factory.getAudioEngine(0x81);
        byte[] adpcm = audioEngine.encode(bits, channels, data);
        AdpmMessage adpmMessage = new AdpmMessage(sampleRate / 1000, bits, false, channels);
        AudioDataMessage audioData = new AudioDataMessage(AudioDataMessage.FORMAT_ADPCM_TYPE2, 0x00, adpmMessage);
        audioData.setData(adpcm);
        events.add(new MfiEvent(audioData, 0l));
View Full Code Here

    /** */
    public void sequence() throws InvalidMfiDataException {
        int id = getIndex();

        AudioEngine engine = Factory.getAudioEngine();
        engine.stop(id);
    }
View Full Code Here

    }

    /** mode �ʂɍĐ����܂��B */
    protected void play() {

        AudioEngine player = MitsubishiSequencer.getAudioEngine();
        switch (mode) {
        case MODE_STORE:
            player.setData(packetId, channel, sampleRate, bits, 1, adpcm, continued);
            break;
        case MODE_SET:
            player.setData(packetId, channel, sampleRate, bits, 1, adpcm, continued);
            player.start(packetId);
            break;
        case MODE_RECYCLE:
            player.start(packetId);
            break;
        }
    }
View Full Code Here

         */
        public static AudioEngine getAudioEngine(int format) {
//Debug.println("format: " + format);
            String key = "audioEngine.format." + format;
            if (engines.containsKey(key)) {
                AudioEngine engine = engines.get(key);
                audioEngineStore.set(engine);
                return engine;
            } else {
Debug.println(Level.SEVERE, "error format: " + format);
                throw new IllegalStateException("error format: " + StringUtil.toHex2(format));
View Full Code Here

TOP

Related Classes of vavi.sound.mobile.AudioEngine$Data

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.