문제

I'd like to use the Visualizer class to capture system wide audio in a specific format. (44.1khz, 16 bits, Stereo)

I can't figure out how to request a certain format be returned to me. I can get a hack to work in gingerbread and earlier to return audio formatted in 16 bits, but still no stereo. Any ideas StackOverflow?

도움이 되었습니까?

해결책

As the Visualizer documentation says:

It is not an audio recording interface and only returns partial and low quality audio content.

and

Two types of representation of audio content can be captured:
  • Waveform data: consecutive 8-bit (unsigned) mono samples by using the getWaveForm(byte[]) method
  • Frequency data: 8-bit magnitude FFT by using the getFft(byte[]) method

Without modifying Android itself so that you can get hold of e.g. the Visualizer's input buffer I don't see how you could get data with a higher sampling rate / higher number of channels.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top