public final boolean isSyncMark(int headerstring,int syncmode,int word) {
        if (syncmode == INITIAL_SYNC) {
            sync = ((headerstring & 0xFFF00000) == 0xFFF00000);
        } else {
            sync = ((headerstring & 0xFFF80C00) == word) && (((headerstring & 0x000000C0) == 0x000000C0) == single_ch_mode);
        }
        // filter out invalid sample rate
        if(sync)
            if(sync = (((headerstring >>> 10) & 3) != 3))
                if(sync = (((headerstring >>> 17) & 3) != 0))
                    sync = (((headerstring >>> 19) & 3) != 1);
        
        if(sync) first_sync = true;
        
        return sync;
    }