This dll was created so people can easily load and play external files. Why would you want to load external file?
- Sound files are generally huge and take forever to load when your Game Maker game starts. Your can load them externally using this.
- No more slowly importing sound files into Game Maker and making blank sound files for them. This is the professional way.
- You can unload sound files from memory when your done with them, instead of just when the game ends.
- Another reason to use this dll in general is because it supports pausing/resuming the sound files. It also now supports obtaining the file position and file length, not to mention mode (if the sound is paused, playing, ect). It also now plays 29 file formats.
Supported Formats:
- .aif
- .aifc
- .aiff
- .asf
- .asx
- .au
- .avi
- .cda
- .m1v
- .m3u
- .mid
- .mp2
- .mp2v
- .mp3
- .mpa
- .mpe
- .mpeg
- .mpg
- .mpv2
- .rmi
- .snd
- .wav
- .wax
- .wm
- .wma
- .wmv
- .wmx
- .wpl
- .wvx
Features:
- Init DLL
- Open sound (uses an id so you could have literally 700+ sounds open)
- Play sound
- Play looped
- Pause sound
- Resume sound
- Stop sound
- Stop all sounds
- Sound position
- Sound length
- Sound seek to position
- Sound mode (playing, paused, ect)
- Channels (wav-only compatible)
- Bytes per second (again only compatible with wavs)
- Can play (checks if the sound is fully compatible)
- Load id for recording (creates an id for use in record functions)
- Record (physical recording)
- Save record (saves the recorded file)
- Close sound (frees the memory)
- Close all
Download:
Download Here
Note:
If a function returns something other than 0 (excluding sound position, sound length, sound mode, and can play) than that is an error code, which means something went wrong. Use common sense with these. For instance if you get an error code when you try and load a sound file, perhaps that file doesn't exist or isn't supported. Also note that I know some of the formats above arn't sound formats, Saudio also currently has limited movie support.
Extra Scripts:
Convert the time from milliseconds to the usual Minitues:Seconds format. Thanks Shaltif.
/*Correct Time Script By: Brandon 'Shaltif' Rohrer ============================= Argument0 = REAL - Time in milliseconds - Return = STRING - Time in MM:SS format*/ var ones, tens, huns; ones = argument0 div 1000; huns = argument0 div 60000; ones -= huns*60; if (ones < 10) { tens = "0"; } else { tens = ""; }; return string(huns)+":"+tens+string(ones);
Increase/Decrease volume scripts by tsg1zzn.
//HOW TO SET THE VOLUME: //script: increase_volume(argument0: how much as real) repeat (argument0-1){ keyboard_press(175); keyboard_release(175); } //script: decrease_volume(argument0: how much as real) repeat (argument0-1){ keyboard_press(174); keyboard_release(174); }
Bugs:
None reported so far...
Future Features:
- Midi tempo change
- Play movies in fullscreen
- Possibly ID3 tag support
Edited by andrewmc, 11 September 2005 - 01:02 AM.