private int getColorWaveformBits ( final ByteBuffer waveBytes , final int segment ) { final int base = ( segment * 2 ) ; final int big = Util . unsign ( waveBytes . get ( base ) ) ; final int small = Util . unsign ( waveBytes . get ( base + 1 ) ) ; return big * 256 + small ; }
Color waveforms are represented by a series of sixteen bit integers into which color and height information are packed . This function returns the integer corresponding to a particular half - frame in the waveform .