home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 55
/
Amiga_Dream_55.iso
/
RISCOS
/
APPS
/
MUSIC
/
0-N
/
MPEG
/
MP3CON.ZIP
/
MP3Conv
/
Readme
< prev
Wrap
Text File
|
1998-04-16
|
4KB
|
87 lines
Mpeg3Play
-=-=-=-=-
Ported by N. Douglas
Yearning to play some music from my PC on my Acorn, I ported one of the
faster generic MPEG 1 Layer 3 readers, mpeg3play. It is so much faster than
the ISO reference code that real time play is possible on a bottom end
Pentium (around 75Mhz or so).
For those in the Acorn world who do not know, MPEG 1 Layer 3 is a sound
compression standard enjoying a massive underground presence on the internet.
It compresses CD quality data by ten times or more by removing detail not
noticed by the human ear - much like JPEG removes detail not noticed by the
human eye.
You can get (albeit illegally) the top 40 of most western countries at any
given stage on the internet, and while I do not condone piracy, I would add
that many people would not buy much of the top 40 anyway. Like software, I
feel that if you find it of value, buy it. The people who make music and
software have to put bread on the table just like anyone else.
Anyway, that said, enclosed here is a port of mpeg3play. Now I thought that
given that WinAmp takes about 20% of my processor on my 300Mhz Pentium system
that perhaps we might get non multitasking play on a 200Mhz StrongArm. Well,
as I found out, that was some pipedream. It's nowhere close, even though I
have enabled integer math processing and various other optimisations such as
prebuilt tables.
So it's a great disappointment. RiscPC users may find it useful - on anything
else it's too slow. It outputs around 50k of decompressed data per minute on
an Arm7 (woeful). Because of it being suitable for only RPC users, all code
will only work on RO3 or above. You can force the mpeg3play utility to work
on RO2, but I'll leave that as an exercise for the user.
To use:
-=-=-=-
Anyway, first find an mp3 file (a test one is enclosed). Set the type to &1ad
which is the Acorn defined filetype for MPEG audio data. Run !MP3Conv, the
front-end I quickly hacked together and converted to C using Basic2C (soon
available from Clares Micro Supplies - plug plug! ;) ). Decide if you want a
multitasking conversion using the icon bar menu (it's on by default), and
drag a MP3 file onto the icon bar icon. Drag the blank icon to where you want
it to go. Conversion will then start assuming you have some taskwindow
handler available.
Alternatively, you can go to the command line with f12 and type (assuming
the test file here):
mpeg3play -v -o out.aiff please.mp3
Using either method, go have a cup of tea and after you should have around
1.2Mb of data in out.aiff in the case of the test file. Fire up something
like SoundCon, set High Endian 16bit Stereo signed linear and play! You'll
know what the sound is when you hear it! BTW, it should be 15.13 seconds long
- it's at half CD quality (22Khz, not 44Khz).
Note that even if the mp3 data is encoded at 44Khz, the quality of the output
from this converter is not CD quality. The use of integer math routines
degrades quality somewhat (you really need double IEEE), and using double
IEEE routines will slow things down even further. The sources are enclosed if
you want to recompile to test this anyway (remove -DFSINGLE and DINT_MATH).
You'll need Unxilib v3.7b as well.
Acknowledgements:
-=-=-=-=-=-=-=-=-
Thanks are due to Johan Hagman for the original modifications to the ISO
reference code. All the ISO's and Johan's documentation is in the docs
directory.
References:
-=-=-=-=-=-
As for mpeg3play (read the docs directory). In addition you may find
http://www.t50.com useful for getting some mp3's. Remember they are illegal
copies.
Contact:
-=-=-=-=
There isn't any warranty whatsoever with this code. It remains under the
licence agreement for the original mpeg3play code.
However, you can contact me about mpeg3play at mpeg3play@nedprod.com. The
website http://www.nedprod.com contains various bits and pieces that I do as
well.
N. Douglas
15th April 1998