Question about sample rate and frame rate sizes with Java Sound API -


i inherited code uses java's sourcedataline sound api.

below how setup audioformat object. seems strange frame-rate , sample-rate set same. make sense? also, there point have 20000000 frame rate or sample rate? don't our ears top out @ 20000?

audioformat af = new audioformat(audioformat.encoding.pcm_signed, 20000000, 16, 1, 2, 20000000, true); 

if stream encoded in pcm format , not compressed, frame contains samples each channel, 1 time index. if stream compressed, frame contains samples each channel, 1 or more time indexes. exact structure of frame depends on compression type.

check out audioformat class definition more details: http://download.oracle.com/javase/6/docs/api/javax/sound/sampled/audioformat.html

most sound systems consider top frequency human ear 22khz, that's why sampling frequency 44khz (according niquist rule).


Comments

Popular posts from this blog

how to build hyperlink for query string in php -

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

queue - mq_receive: message too long -