Music which is usually used by the sinners is not permissible to listen to. But if you hear it with out intention while moving or being at place that you cannot leave, hearing is not listening. Hearing does not mean intentional listening, but it means that you are forced to hear something which is in the place where you are. We need to avoid listening to the music totally because the sinful music is not permitted to listen to. Hearing what we cannot avoid is not listening.