audio connection to arduino

So, im having trouble reading in values from an audio cable. i wrote a simple code to read in the values from left and right audio channels from a 3.5mm cable. the problem is i never seem to get values any larger than about 23. and i wanted the values to be in the proper range (from 0-255)

i just hooked it up simply, ground to ground, white audio line to A0 and red audio line to A1. should i use anything like a capacitor or something to filter it out. also the volume is at its max.

code:
// Variable declairation
int valL = 0;
int valR = 0;

// setup
void setup() {
Serial.begin(9600); // open serial port
pinMode(A0,INPUT);
pinMode(A1,INPUT);
}

// Main
void loop() {
valL = analogRead(A0);
valR = analogRead(A1);
Serial.println(valL);
delay(100);
}

A couple of notes.

fizzul:
the problem is i never seem to get values any larger than about 23.

Audio signals, especially if it is line level, really aren't that much. So you won't see the full range of the ADC get used. Also, they are positive and negative voltages. Negative voltages can (and will) damage the Arduino's inputs.

fizzul:
and i wanted the values to be in the proper range (from 0-255)

The ADC's values will range from 0 to 1023.

fizzul:

    pinMode(A0,INPUT);

pinMode(A1,INPUT);

For future reference, there is no need to declare Analog Inputs as INPUT, if you are going to use them as Analog Inputs. This actually tells the Arduino you want to use them as a digital input. (Which doesn't matter because when you call analogRead(), it switches the pin back to analog anyway.)

Lastly, the sampling rate for the Arduino is only about 10k/s. Most audio is sampled at 44k/s. So you aren't going to get much in the way of real-time, by putting audio into the Arduino's input.

What were you hoping to do with the sound?

Thanks alot, those are all useful points that ill take into account.

i could use a rectifying circuit to take the absolute value of the circuit? so i dont have to worry about negative voltages? also, what can i do to get a larger range of values, so i can better see changes that would occur?

i was planning on taking the fast fourier transform of the data and outputting it like a spectrum analyser to an LCD screen.

You might be interested in this section of the playground:

http://arduino.cc/playground/Main/InterfacingWithHardware#audio_input

Check on a link, could be what you trying to accomplish:
http://fftarduino.blogspot.com/2011/02/color-organ-spectrum-analyzer-on.html