Controlling volume from speakers

I tried using teckel's toneAC library but it doesn't work(it just says 'toneAC' was not declared in this scope even though I already imported the library to my project), I don't think it's compatible with my Arduino ATmega644. I would have loved to use it to save money using a digital potentiometer because i'm really low on budget right now but I guess I have to follow what mike has said. Been searching tutorials on how to use digital potentiometers and hopefully when my order arrives everything will turn out okay. Sorry for the very late reply guys! been very busy these days. :slight_smile:

I have a question Mike, so before I connect my speaker to the arduino it goes through the digital potentiometer first right?

and also...
I ordered a X9C103P Digital Potentiometer will this be okay to do the job? I ordered this one because it's the only one that is available here in our region. :slight_smile: