----------------------------------
Title: MCIMP3 Blitz3D Userlib
Version: 1.0 @ November 21, 2008
Author: Jos Lucio M. Gama "SLotman"
Website: http://www.icongames.com.br
----------------------------------

COPYRIGHT NOTICE
Copyright 2008-2012 Jos Lucio M.Gama. All Rights Reserved.

This script may be used and modified free of charge by anyone
AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
By using this code you agree to indemnify Jos Lucio M. Gama from any
liability that might arise from it's use.

Selling the code for this program, in part or full, without prior
written consent is expressly forbidden.

Obtain permission before redistributing this software over the Internet
or in any other medium. In all cases copyright and header must remain
intact. This Copyright is in full effect in any country that has
International Trade Agreements with the United States of America or
with the European Union.
-----------------------------------------------------------------------

MCIMP3 is a userlib to play MP3 files without having to load the
file completly into RAM. Also, multiple files can be played at
once, and you can change their speed (pitch).

To use it, first put winmm.decls on your Blitz3D\userlibs\ folder.
Then add mciMP3.bb at the same folder your program is, and put the following line into your program:

include "mciMP3.bb"

After that you're ready to use it!

This userlib may be used freely. All I ask is a small credit somewhere in your program. But if you find it usefull, or use it on a comercial program, please make a donation to keep our website running. A donation can be made at http://www.icongames.com.br/b3duserlibs/ or through the link below:

https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1314394

See sample.bb for a small sample on how to use the library.

Thanks, and good luck!

---------------------------
ID = mciMP3Open(filename)
---------------------------
Open a stream to "filename". Returns a pointer to the stream

----------------------------
mciMP3Play(ID, [loop_music])
----------------------------
Play "song" (pointer returned on mciMP3Open). set loop_music to true, 
so the music will loop.
[loop_music] is optional and defaults to true

mciMP3Pause(ID)
-------------------------
Pause the song

-------------------------
mciMP3Resume(ID)
-------------------------
Resume the song

-----------------------------
mciMP3SetVolume(ID, volume) 
-----------------------------
Change music volume. Volume changes from 0 to 100 

-------------------------
mciMP3Speed(ID, speed) 
-------------------------
Change music speed. 
speed=100, normal speed
speed=050, play music half the normal speed
speed=200, play music twice as fast as the normal speed

-------------------------------------
mciMP3SetQuality(ID, Quality$="high")
-------------------------------------
Set the audio quality, can be high/medium/low

-------------------------
mciMP3Position(ID)
-------------------------
Return the song current position in milliseconds. 

-------------------------
mciMP3Length(ID)
-------------------------
Return the length of the song in milliseconds.

----------------
mciMP3Mode$(ID)
----------------
Return if song is not ready, playing, paused or stopped

----------------
mciMP3Stop(ID)
----------------
Stop the song.

---------------------
mciMP3Close(ID)
---------------------
Close the stream

---------------------
mciMP3Free()
---------------------
Release memory used by the program. Should be called when exiting the
program.



