private int decodeExtension(BitStream in, int extensionID) throws AACException {
final int start = in.getPosition();
switch(extensionID) {
case EXTENSION_ID_PS:
if(ps==null) ps = new PS();
ps.decode(in);
if(!psUsed&&ps.hasHeader()) psUsed = true;
break;
default:
in.skipBits(6); //extension data