for (int i = 1; i <= m.getTrackCount(); ++i)
{
final Track track = m.getTrack(i);
final Media media = track.getMedia();
final MediaHandler mediaHandler = media.getHandler();
// MediaHandler can be instanceof both AudioMediaHandler and VisualMediaHandler, for example MPEGMediaHandler.
if (mediaHandler instanceof AudioMediaHandler)
{
hasAudio = true;
}