First look at the physical things.
Have her pediatrician look at her ears.
1. Make sure they are not infected and there is no heavy wax buildup.
2. Also look at her sinus. Make sure there is no infection there either. If he/she tells you they cannot see a babies sinus because it is so small...go to another doctor. One that knows what he/she is doing. Mine could look at my kid and see when there was inflamation. A friends dr told her they were tiny and he was having trouble seeing inflamation so he did a scan and sure enough they were very inflamed. So it can be done. ;-)
3. Check other possible things your dr may suggest such as urinary infection. Seems unlikely in a baby, but it does happen--more so with girls.
4. Have the pediatrician check her from head to toe for ANYTHING!
4. If needed get her ears checked thoroughly by a pediatric ENT- ear nose and throat doctor. They will possibly even have an audiogram done which is totally painless and easy. An audiogram is when they put the child in a sound proof booth on mom's lap, then ask her to wave when she hears a sound in the headphones. It will be little series of beeps at different frequencies. This measures what tones she is hearing. Most of these guys are amazing with the kids and can tell you exactly what is going on. I have been to a few and have yet to have a bad one.
5. Then if all that checks out okay look to behavior. It can very well be a learned bad habit.
You don't want to jump the gun and be punishing her for something she can't deal with because it has a physical cause. Just like when a baby is hungry and you don't feed them. Then you would feel so guilty and she would still be miserable unitl you were able to get it fixed.
I would rule out other things first. Babies don't know how to cope with different stimuli. They can get overwhelmed easily. A sudden reduction in hearing, a sudden pain, a lot of noise or lights coming at them at once or even over a period of time just overwhelms them. So they do what they can...which is usually scream, or cry, or hold their breath. Whatever comes to mind.
Hang in there. I know it is tough when they are too little to tell you what is going on.