Package org.kc7bfi.jflac.metadata

Examples of org.kc7bfi.jflac.metadata.SeekTable


        if (type == Metadata.METADATA_TYPE_STREAMINFO) {
            streamInfo = new StreamInfo(bitStream, length, isLast);
            metadata = streamInfo;
            pcmProcessors.processStreamInfo((StreamInfo)metadata);
        } else if (type == Metadata.METADATA_TYPE_SEEKTABLE) {
            metadata = new SeekTable(bitStream, length, isLast);
        } else if (type == Metadata.METADATA_TYPE_APPLICATION) {
            metadata = new Application(bitStream, length, isLast);
        } else if (type == Metadata.METADATA_TYPE_PADDING) {
            metadata = new Padding(bitStream, length, isLast);
        } else if (type == Metadata.METADATA_TYPE_VORBIS_COMMENT) {
View Full Code Here


        if (type == Metadata.METADATA_TYPE_STREAMINFO) {
            streamInfo = new StreamInfo(bitStream, length, isLast);
            metadata = streamInfo;
            pcmProcessors.processStreamInfo((StreamInfo) metadata);
        } else if (type == Metadata.METADATA_TYPE_SEEKTABLE) {
            metadata = new SeekTable(bitStream, length, isLast);
        } else if (type == Metadata.METADATA_TYPE_APPLICATION) {
            metadata = new Application(bitStream, length, isLast);
        } else if (type == Metadata.METADATA_TYPE_PADDING) {
            metadata = new Padding(bitStream, length, isLast);
        } else if (type == Metadata.METADATA_TYPE_VORBIS_COMMENT) {
View Full Code Here

            }
        }

        // make Seek Table
        SeekPoint[] points = new SeekPoint[albumFiles.size()];
        SeekTable seekTable = new SeekTable(points, true);
        int metadataHeader = ( Metadata.STREAM_METADATA_IS_LAST_LEN + Metadata.STREAM_METADATA_TYPE_LEN + Metadata.STREAM_METADATA_LENGTH_LEN ) / 8;
        int metadataOffset = Constants.STREAM_SYNC_STRING.length + masterStreamInfo.calcLength() + seekTable.calcLength() + metadataHeader * 2;
        for (int i = 0; i < albumFiles.size(); i++) {
            PackerFile aFile = (PackerFile) albumFiles.get(i);
            appendMsg("SeekTable build " + i + " Offset=" + aFile.seekPoint.getStreamOffset() + " header=" + metadataOffset);
            aFile.seekPoint.setStreamOffset(aFile.seekPoint.getStreamOffset() + metadataOffset);
            points[i] = aFile.seekPoint;
View Full Code Here

            e1.printStackTrace();
            return;
        }

        // get seek table
        SeekTable seekTable = makeSeekTable();
        if (masterStreamInfo == null) {
            return;
        }

        // write FLAC marker
        os.writeByteBlock(Constants.STREAM_SYNC_STRING, Constants.STREAM_SYNC_STRING.length);

        // output StreamInfo
        masterStreamInfo.write(os, false);

        // output SeekTable
        seekTable.write(os, true);

        // generate output file
        for (int i = 0; i < albumFiles.size(); i++) {
            PackerFile aFile = (PackerFile) albumFiles.get(i);
            appendMsg("Process file " + i + ": " + aFile.file);
View Full Code Here

TOP

Related Classes of org.kc7bfi.jflac.metadata.SeekTable

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.