Re: madplay on mips

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pete Popov wrote:
> Has anyone used madplay on mips to play mp3 files successfully? I've
> tried it on two mips boards with different sound drivers, and in both
> cases it plays the song slower and a bit muffled.  It works on x86 and
> supposedly ppc.

Muffled sound could be the result of a poor FPM choice, or a buggy compiler.

For best performance, MAD needs a multiply/accumulate instruction, which is
not available on all MIPS platforms. Check the MIPS section of libmad/fixed.h
and see whether you can use either of the MADD_ASM alternatives, then change
your libmad/config.h to suit (or consider updating libmad/configure.in). In
the worst case you might need to write a new asm alternative, or try something
more generic like FPM_64BIT or FPM_DEFAULT -- though the latter could also be
the cause of poor sound.

I've encountered problems with certain gcc optimization options on some
platforms, notably ARM and MIPS, the symptom being a sort of muffled sound
result rather than the clear sound MAD ought to produce. I never traced these
bugs in the compiler, so my only advice is to try different combinations of
-fstrength-reduce and -finline-functions if you suspect this to be a problem.

> Even though madplay claims that no floating point is used, the
> disassembly of the latest version shows otherwise. But I tried it on a
> board with a cpu that does have a hardware floating point unit with the
> same result.

The _only_ floating point used by madplay is in option parsing and calculation
of peak amplitude in decibels upon completion of decoding. There is no
floating point used in the decoder proper (libmad).

I'm not sure what you mean by songs "playing slower" but it could be either
libmad is not reaching real-time performance, or there could be issues with
channel/sampling frequency selection in your sound driver. You could try -m
and/or --downsample, or modify the audio output module to use a fixed known
good sampling frequency. Also try sending output to a file (-o out.wav) and
see if you can play that successfully with another program.

If the problem is real-time performance, you can try the --enable-speed option
to `configure' at the expense of some accuracy.

-- 
Rob Leslie
rob@mars.org


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux