Technical legal, but very vaguely written. A bill is going through the house/senate to attempt to correct some of the problems....but currently if you do it against an officer, they'll likely (if they know or think you are recording):
A) threaten to arrest you
B) arrest you (charge you with a felony)
C) file a warrant for you in the future that is a felony warrant for having recorded them.
Likely charges will get dropped....unless they have a real vendetta against you. Just the question of how much crap you deal with.