I am really surprised by the majority of the responses.
I have shouted at my 4yo DTs on occasion. I thought that was okay every now and then. I've never smacked but I have raised my voice as has DH.
I can't believe that there are some people on here who can't comprehend how a decent parent can occasionally lose their temper.
The way I see it (dons hard hat):
4yo wants own music. Dad says no because he is the adult in charge.
4yo has a melt down which drowns out the radio and heightens the atmosphere in an enclosed space.
Dad loses his temper. Mum intervenes and makes it obvious that she disapproves of dad.
4yo has learned that tantrum was acceptable to mum and that dad is in the wrong.
If it had been me, my focus would have been calming DD down then having a long chat with eye contact about acceptable behaviour. DD would have no inkling that I disapprove of DP's behaviour.
If I did disapprove (and I'm not sure I would, the occasional row from an adult is not the breaking of a child-my mum could get bloody scary and Im not traumatised, in fact she is my rock). Anyway, if I did disapprove I'd have long chat with DH once 4yo in bed to look at how we parent and set boundaries.
I think that the worst thing about this whole situation is the blatant undermining of your DP in front of DD-now that is confusing for a child!
Clear consistent agreed boundaries and frequently reflecting on your parenting as a team is the key here.
Honestly, your DD will be fine after this row but she's more likely to be damaged by the fact you are parenting so differently and not offering each other any support at such a vital stage.
Good luck OP