Package vavi.sound.mfi

Examples of vavi.sound.mfi.InvalidMfiDataException


     */
    public int getResolution(Track[] mfiTracks)
        throws InvalidMfiDataException {

        if (mfiTracks.length == 0) {
            throw new InvalidMfiDataException("no tracks");
        }

        Track track = mfiTracks[0];
        for (int j = 0; j < track.size(); j++) {
            MfiEvent event = track.get(j);
View Full Code Here


        dummy      = dis.read();    // 0x01
        int part   = dis.read();
        int zwitch = dis.read();
Debug.println("dummy " + dummy + ", part " + part + ", switch " + zwitch);

        throw new InvalidMfiDataException("unsupported: " + 0xf2);
    }
View Full Code Here

Debug.println("majorType: " + majorType);
Debug.println("minorType: " + minorType);
Debug.println("[sorc]: "    + subChunks.get(SorcMessage.TYPE));
Debug.println("[titl]: "    + subChunks.get(TitlMessage.TYPE));
Debug.println("[vers]: "    + subChunks.get(VersMessage.TYPE));
            throw new InvalidMfiDataException("fields are not filled");
        }

        // 2. recalc
        this.dataLength = HEADER_LENGTH + getSubChunksLength();
        int headerChunkLengthDash = 2 + dataLength; // type, length excluded
View Full Code Here

        // 1.1. type
        byte[] bytes = new byte[4];
        dis.readFully(bytes, 0, 4)// type
        String string = new String(bytes);
        if (!TYPE.equals(string)) {
            throw new InvalidMfiDataException("invalid type: " + string);
        }

        // 1.2 length
        headerChunk.mfiDataLength = dis.readInt();
Debug.println("mfiDataLength: " + headerChunk.mfiDataLength);
View Full Code Here

        try {
            midiSequencer.setSequence(MfiSystem.toMidiSequence(sequence));
        } catch (InvalidMidiDataException e) {
Debug.println(e);
            throw (InvalidMfiDataException) new InvalidMfiDataException().initCause(e);
        } catch (MfiUnavailableException e) {
Debug.println(e);
            throw (RuntimeException) new IllegalStateException().initCause(e);
        }
    }
View Full Code Here

        try {
            return convert(mfiSequence);
        } catch (IOException e) {
Debug.printStackTrace(e);
            throw (InvalidMfiDataException) new InvalidMfiDataException().initCause(e);
        } catch (InvalidMidiDataException e) {
Debug.printStackTrace(e);
            throw (InvalidMfiDataException) new InvalidMfiDataException().initCause(e);
        }
    }
View Full Code Here

        byte[] bytes = new byte[4];
        dis.readFully(bytes, 0, 4);
        String string = new String(bytes);
        if (!TYPE.equals(string)) {
//Debug.println("dump:\n" + StringUtil.getDump(is, 64));
            throw new InvalidMfiDataException("invalid track: " + string);
        }

        // length
        int trackLength = dis.readInt();
Debug.println("trackLength[" + trackNumber + "]: " + trackLength);
View Full Code Here

     */
    public static VoiceEditMessage readFrom(int delta, int status, int data1, InputStream is)
        throws InvalidMfiDataException,
               IOException {

        throw new InvalidMfiDataException("unsupported: " + 0xf1);
    }
View Full Code Here

        // type
        byte[] bytes = new byte[4];
        dis.read(bytes, 0, 4);
        String string = new String(bytes);
        if (!TYPE.equals(string)) {
            throw new InvalidMfiDataException("invalid audio data: " + string);
        }

        // length
        int audioDataLength = dis.readInt();
View Full Code Here

TOP

Related Classes of vavi.sound.mfi.InvalidMfiDataException

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.