Re: Audio File Names

"Metathronius Galabant" <[email protected]> Thu, 21 Dec 2006 14:16:33 +0100
Newsgroups gmane.comp.multimedia.xmms.devel
Message-ID <[email protected]>
> Is there a way that I can have XMMS recognize my wavfiles without having to
> add file (.wav) extensions?  My system sees that they are wavs but XMMS
> doesn't recognize them without the extensions.

This is pretty easy, if you want it to hack it on your own.

xmms-1.2.10/Input/wav/wav.c -> look at the is_our_file() function:

	ext = strrchr(filename, '.');
	if (ext)
		if (!strcasecmp(ext, ".wav"))
			if (read_wav_id(filename) == WAVE_FORMAT_PCM)
				return TRUE;


The read_wav_id() is supposed to read in the header and check against
a certain magic.
BUT only if the file ends in .wav - so you want to take that check
out, as seen above.

Be warned that each Input plugin is called against the is_our_file()
function - so don't just return TRUE in WAV one!

Cheers,
M