Is It Safe to Wear Headphones with an Ear Infection?

can you wear headphones with ear infection?