Audio capture

Hi, i'm attempting to capture audio data from a targetdataline on a specific mixer unsuccessfully apparently.

I currently have:

Mixer.Info[] mixerInfo = AudioSystem.getMixerInfo();

And when printing all the info out of this, I have the following mixers:

Primary Sound Driver

SB X-Fi Audio [DC00]

Realtek AC97 Audio

Primary Sound Capture Driver

SB X-Fi Audio [DC00]

Realtek AC97 Audio

Java Sound Audio Engine

Port SB X-Fi Audio [DC00]

Port Realtek AC97 Audio

Of which I presume, I wish to be using one of the SB X-FI audio mixers, since thats my default sound output.

The problem i'm having however is that I cannot seem to capture any data from this line.

Mixer mixer = AudioSystem.

getMixer(mixerInfo[4]);

targetDataLine = (TargetDataLine)

mixer.getLine(dataLineInfo);

(Have tried other mixers with varying success as to whether they break due to unsupported format or not basically)

I then create a seperate thread to do the capturing into a temporary buffer but the buffer is just writing values of -1, 0, and 1 (which I put down to low level static signal on an input/output which is receiving no data IE isn't plugged into anything).

My SB X-Fi audio has several inputs and outputs (5 channel sound across 3 ports and 1 channel input).

All I want really is integer values for current sound playing (IE frequency values) so that I can create some cool visualisations out of the data.

[1531 byte] By [Introvituma] at [2007-11-26 20:08:26]
# 1
BTW looking at my SB X-Fi device, since it runs in the I/O range DC00 - DC1F can I not just steal the input directly from the device? I am of course bearing in mind it may have a mental formatting system but still... can't be that hard.
Introvituma at 2007-7-9 23:11:08 > top of Java-index,Security,Cryptography...
# 2

hi introvitum;

i'm facing same problem capturing audio sound using java or even using default windows xp capture too (accessories->sound capture)

i can't hear anything after i record some sample sound.

what could be the problem ?

is it related to Realtek AC97 driver not supporting capture ?

i would appreciate if you help me come up with java code to capture audio sound

thanks.

Servant@AKa at 2007-7-9 23:11:08 > top of Java-index,Security,Cryptography...
# 3
hi Get the sample source code from http://javasolution.blogspot.com/2007/04/record-and-save-audio-using-java.html
Arunssofta at 2007-7-9 23:11:09 > top of Java-index,Security,Cryptography...