Jump to content


Photo

Saudio Dll V1.0 Updated 9/10


  • Please log in to reply
272 replies to this topic

#1 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 30 August 2005 - 09:55 PM

Posted Image

Info:

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 - 12:48 AM.

  • 0

#2 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 30 August 2005 - 10:22 PM

Very Very Good!
Finally a simplified mp3 player.
You should add support to more formats tho.

But i will probablly use it cuz it supports mp3.
Shaltif's SXSM is probablly best too but it's too confusing for me.

But this is so awesome.. 10/10

Edited by Shinnoki, 30 August 2005 - 10:39 PM.

  • 0

#3 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 30 August 2005 - 10:42 PM

Very Very Good!
Finally a simplified mp3 player.
You should add support to more formats tho.

But i will probablly use it cuz it supports mp3.
Shaltif's SXSM is probablly best too but it's too confusing for me.

But this is so awesome..  10/10

<{POST_SNAPBACK}>


I don't know if I'll add more formots (it already supports the most popular ones) but I will add more useful features... including playing files looped, getting postition in file, and more. Thanks :whistle:
  • 0

#4 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 30 August 2005 - 10:46 PM

Dude, I need get current track position and get total track time and this would be PERFECT.
  • 0

#5 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 30 August 2005 - 11:15 PM

Dude, I need get current track position and get total track time and this would be PERFECT.

<{POST_SNAPBACK}>


Yeah I'm working on that...
  • 0

#6 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 30 August 2005 - 11:54 PM

I hate to double post but I would like everyone to know that I've added these features:

- File position
- File length
- File mode (playing, paused, ect)
- Close all files
  • 0

#7 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 31 August 2005 - 12:28 AM

Thank you man! I'll give full credits for the .dll in my program!

GmDude66
  • 0

#8 coderchris

coderchris

    GMC Member

  • New Member
  • 332 posts

Posted 31 August 2005 - 12:35 AM

Very cool dll. It uses the super simple approach which is my favorite :whistle:
(make it super easy for the user to use)

You have a nice amount of support functions in there which is good
Very usefull for lots of games
  • 0

#9 Who_d3n

Who_d3n

    GMC Member

  • New Member
  • 499 posts

Posted 31 August 2005 - 01:35 AM

Just What I needed!!!! :whistle:

Perfect!!! :)


Simple!!! ;)


YAAAAAAAHHHHH!! :P

Great Job :skull: !!!

10/10!!
  • 0

#10 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 31 August 2005 - 01:59 AM

Thanks for the good comments... we have 2 more functions!

- Stop all sounds
- Seek to a position in a sound file (will make a media player complete!!)
  • 0

#11 Who_d3n

Who_d3n

    GMC Member

  • New Member
  • 499 posts

Posted 31 August 2005 - 02:49 AM

Ok I tryed to work with the seek function to make it where you press a plus button it will move fowards one point(spot) in the song

Or a fast forward button would be great!!!

But I dont know how I would make sure I dont go over the songs limit
is there a variable for this that I dont know of??or didnt see??
  • 0

#12 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 31 August 2005 - 10:39 AM

Ok I tryed to work with the seek function to make it where you press a plus button it will move fowards one point(spot) in the song

Or a fast forward button would be great!!!

But I dont know how I would make sure I dont go over the songs limit
is there a variable for this that I dont know of??or didnt see??

<{POST_SNAPBACK}>


Edit: I just realized days later I didn't understand the question, lol. Saudio can't go over a song's limit. It's not possible.

For your + you could do...

saud_Seek(saud_Position("song")+1000,"song")

That would skip ahead a second in a song.

Edited by andrewmc, 03 September 2005 - 04:59 PM.

  • 0

#13 DaveDDay

DaveDDay

    GMC Member

  • New Member
  • 29 posts

Posted 31 August 2005 - 01:28 PM

Wow. This is perfect - it's quick, it plays externally, and can seek. Brilliant work!

Edited by DaveDDay, 31 August 2005 - 01:29 PM.

  • 0

#14 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 31 August 2005 - 09:40 PM

Wow. This is perfect - it's quick, it plays externally, and can seek. Brilliant work!

<{POST_SNAPBACK}>


Thanks... I have no clue as to why requests are getting more attention than this.
  • 0

#15 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 31 August 2005 - 10:54 PM

I'll be waiting for the ID3/mp3 tags. :medieval:
  • 0

#16 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 31 August 2005 - 11:34 PM

I'll be waiting for the ID3/mp3 tags. :medieval:

<{POST_SNAPBACK}>


Would you mind if that made the dll bigger?
  • 0

#17 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 01 September 2005 - 12:27 AM

Nope. Doesn't matter to me.. Make it as big as you want. =P
  • 0

#18 BlaXun

BlaXun

    Slime Online Creator

  • GMC Member
  • 2616 posts
  • Version:GM:Studio

Posted 01 September 2005 - 10:40 AM

Well, it really is simple and easy to use..but...I loaded a mp3 and on some positions it sounded wierd....in winamp it was fine...... wierd.....I'd like to use it....but this problem prevents me to do so
  • 0

#19 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 01 September 2005 - 09:29 PM

IDK BlaXun... it works fine for me.
  • 0

#20 Matt13

Matt13

    GMC Member

  • New Member
  • 580 posts

Posted 01 September 2005 - 09:30 PM

Nice, many people here wanted a DLL like this. Good job.

- Matt
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users