private StreamConfiguration adjustConfigurations ( AudioFormat format ) { int sampleRate = ( int ) format . getSampleRate ( ) ; int sampleSize = format . getSampleSizeInBits ( ) ; int channels = format . getChannels ( ) ; StreamConfiguration streamConfiguration = new StreamConfiguration ( ) ; streamConfiguration . setSampleRate ( sampleRate ) ; streamConfiguration . setBitsPerSample ( sampleSize ) ; streamConfiguration . setChannelCount ( channels ) ; return streamConfiguration ; }
Method sets input stream configuration for encoder .