src/share/classes/com/sun/media/sound/UlawCodec.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 299,309 **** lowByte = 0; } // set the AudioInputStream length in frames if we know it if (stream instanceof AudioInputStream) { ! frameLength = ((AudioInputStream)stream).getFrameLength(); } // set framePos to zero framePos = 0; frameSize = inputFormat.getFrameSize(); if (frameSize == AudioSystem.NOT_SPECIFIED) { --- 299,309 ---- lowByte = 0; } // set the AudioInputStream length in frames if we know it if (stream instanceof AudioInputStream) { ! frameLength = stream.getFrameLength(); } // set framePos to zero framePos = 0; frameSize = inputFormat.getFrameSize(); if (frameSize == AudioSystem.NOT_SPECIFIED) {
*** 404,415 **** if(readCount<0) { // EOF or error return readCount; } for (i = off; i < (off + (readCount*2)); i+=2) { ! b[i] = (byte)tabByte1[b[readOffset] & 0xFF]; ! b[i+1] = (byte)tabByte2[b[readOffset] & 0xFF]; readOffset++; } return (i - off); } } --- 404,415 ---- if(readCount<0) { // EOF or error return readCount; } for (i = off; i < (off + (readCount*2)); i+=2) { ! b[i] = tabByte1[b[readOffset] & 0xFF]; ! b[i+1] = tabByte2[b[readOffset] & 0xFF]; readOffset++; } return (i - off); } }