the radio is shutting off at idle because the alternator is not spinning and isn't giving the amp enough juice...the resulting voltage drop kills the cd player.
if the amp turns off then yes, your battery is near dead.
<span style='color:gray'><span style='font-family:Courier'>1995 e36 3 Series RIP
1999 e46 3 Series BURN IN HELL
2000 MR-S Roadster= Current</span></span>