Examples of AudioEngine


Examples of vavi.sound.mobile.AudioEngine

        // 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

Examples of vavi.sound.mobile.AudioEngine

        // 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

Examples of vavi.sound.mobile.AudioEngine

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

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

Examples of vavi.sound.mobile.AudioEngine

    }

    /** 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

Examples of vavi.sound.mobile.AudioEngine

         */
        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

Examples of vavi.sound.mobile.AudioEngine

     * @param channels adcpm channels
     */
    public static List<MfiEvent> getAdpcmEvents(byte[] pcm, float time, int sampleRate, int bits, int channels) throws InvalidMfiDataException {
        int delta = getDelta(time);
Debug.println("delta: " + delta);
        AudioEngine audioEngine = MitsubishiSequencer.getAudioEngine();
        byte[] adpcm = audioEngine.encode(bits, channels, pcm);
Debug.println("adpcm mono length: " + adpcm.length);
        List<MfiEvent> events = new ArrayList<MfiEvent>();
        if (channels == 1) {
Debug.println("adpcm length: " + adpcm.length);
            events.addAll(getAdpcmEventsSub(L, 0, sampleRate, bits, adpcm));
View Full Code Here

Examples of vavi.sound.mobile.AudioEngine

         * @throws IllegalStateException when audio engine not found
         */
        public static AudioEngine getAudioEngine(int 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: " + StringUtil.toHex2(format));
                throw new IllegalStateException("error format: " + StringUtil.toHex2(format));
View Full Code Here

Examples of vavi.sound.mobile.AudioEngine

    }

    /* */
    public void sequence() throws InvalidSmafDataException {
Debug.println("WAVE DATA: " + number);
        AudioEngine engine = Factory.getAudioEngine(format);
        engine.setData(number, -1, samplingRate, samplingBits, channels, data, false);
    }
View Full Code Here

Examples of vavi.sound.mobile.AudioEngine

    }

    /* */
    public void sequence() throws InvalidSmafDataException {
Debug.println("WAVE PLAY: " + number);
        AudioEngine engine = Factory.getAudioEngine();
        engine.start(number);
    }
View Full Code Here

Examples of vavi.sound.mobile.AudioEngine

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

        AudioEngine engine = Factory.getAudioEngine();
        engine.start(id);
    }
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.