Allen Avionics Audio Isolation Transformers page describes the typical ground loop problem situation with the following drawing:

If you want to do the ground loop elimination in audio path, you have to cut the galvanic connection but pass the whole audio range. The simplest and most common way to do the isolation is use audio transformer. High-quality audio transformers cover whole audio band with good response.
Usually when you install an audio galvanic isolation to almost any place in the audio cable connection is solves the ground loop caused humming problem nicely.
Xitel Ground Loop Isolator page gives a good example how to use a ground loop isolator (audio isolation transformer) to solve ground a typical ground loop problem:

To make an audio isolator you have to get two audio transformers which have 1:1 transformation ratio and greater than 1 kohm impedance (prefererably many kilo-ohms for consumer line level applications). There are high quality audio transformers in the markes that meet those specs.
There are several ways how to wire an audio isolation transformer. Here is a basic wirings for isolation transformers for unbalanced and balanced lines:


There are variations how ground are wired on different audio isolation transformers. There are various ways with their advantages and disadvantages. The followinf solution circuit diagram from Allen Avionics Audio Isolation Transformers page conbines all different variations to one device, so you can always easily select (with a switch) the one that works best on you specific application:

The 3-position switch will eliminate the need to cut pin “1″ to lift the audio ground and the connection to the shield. Switch Positions:
1. Chassis shield connected. Audio ground not connected. Acts as a balanced line transformer to break ground loops. Eliminates hum and buzz.
2. Chassis shield and audio ground connected. Corrects balance on audio lines.
3. Chassis shield and audio ground not connected. Breaks ground loops. Provides audio isolation.
When selecting a transformer for your project keep in mind the quality. Cheapest transformers for audio use have some problems on the sound quality, typically distorted bass response and attenuating in high-frequency response. Basically a poor transformer slows down high frequencies more than low frequencies (because of transformer leakage inductance). This allows the low frequencies to pass first, creating what we perceive as a “fat/warm” tone. Inadequate frequency response on the low end (roll off at like 20Hz), causes low frequencies to be “slowed”, allowing the upper frequencies to be heard first, this is perceived as “barky/ brittle”.
When installing audio isolation transformer to an audio system HIFI people usually ask does that transformer affect the sound in some way and if it does something how much effect does it have. The truth is that the effect of adding an audio audio isolation transformer to a system that does not have ground loop problem could be anything from unnoticeable to normal listener to well noticeable. How much the transformer affects depends on the transformer quality and properties of the equipment between which the transformer is connected. So if there is no humming on the system, the transformer usually has some slightly negative effect on sound quality.
In case an audio transformer is installed to a system with ground loop humming, the effect of it will for sure be possible. The annoying ground loop humming will be heard by everybody. When the isolation transformer get rid of that, the would quality is very much improved at that moment (typically the negative effects of the transformer to sound are much smaller than the annoying humming is). It is a good idea to keep an audio isolation transformer on your tool box when you work with audio/video systems, and use it in you get ground loop problems.