(name v.s 'a') is it possible?

Why would you want to change "buffer"?
It contains a complete pathname after the sprintf .
You pass the value of "name" into the playWav function

I'm trying to help here, so can you put the attitude outside to play on its own for a while?