Jump to content


Photo

Saudio Dll V1.0 Updated 9/10


  • Please log in to reply
278 replies to this topic

#1 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 30 August 2005 - 10:09 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 - 01:02 AM.

  • 0

#2 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 30 August 2005 - 10:36 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:53 PM.

  • 0

#3 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 30 August 2005 - 10:56 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 - 11:00 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:29 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 31 August 2005 - 12:08 AM

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:42 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:49 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:49 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 - 02:13 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 - 03:03 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:53 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 - 05:13 PM.

  • 0

#13 DaveDDay

DaveDDay

    GMC Member

  • New Member
  • 29 posts

Posted 31 August 2005 - 01:42 PM

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

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

  • 0

#14 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 31 August 2005 - 09:54 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 - 11:08 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:48 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:41 AM

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

#18 BlaXun

BlaXun

    Slime Online Creator

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

Posted 01 September 2005 - 10:54 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

iBNKRoX.png


#19 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 01 September 2005 - 09:43 PM

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

#20 Matt13

Matt13

    GMC Member

  • New Member
  • 580 posts
  • Version:Unknown

Posted 01 September 2005 - 09:44 PM

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

- Matt
  • 0

#21 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 01 September 2005 - 10:39 PM

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

<{POST_SNAPBACK}>


Hmmm... thats very odd. I'd say it has to be something wierd with your computer... wierd that winamp works though. I'm also glad that everyone finds it so easy.

It's very hard to develop something when you have school for most of the day then 3+ hours of homework. I'll try my best at fitting some development for this in my days.
  • 0

#22 MP2:E

MP2:E

    GMC Member

  • New Member
  • 152 posts

Posted 01 September 2005 - 11:52 PM

This RULEZ!!!!!!!!! :lol: 11/10!!! XD
  • 0

#23 Matt13

Matt13

    GMC Member

  • New Member
  • 580 posts
  • Version:Unknown

Posted 02 September 2005 - 12:05 AM

lmfao 11/10
  • 0

#24 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 02 September 2005 - 10:33 PM

edit; nvm

Edited by Shinnoki, 02 September 2005 - 10:33 PM.

  • 0

#25 Who_d3n

Who_d3n

    GMC Member

  • New Member
  • 499 posts

Posted 03 September 2005 - 03:44 AM

Can you add something that tells you what file you are on?
  • 0

#26 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 03 September 2005 - 04:20 PM

Update!

- The loading system is a bit better.
- Get position and get length return a number in the form of an integer, instead of a string.
- Seek now accepts numbers in the form of an integer, instead numbers as a string.

By integer instead of sting I mean...

saud_Seek("400","sound");

Thats what it was before. Now after...

saud_Seek(400,"sound");

This makes development with Saudio easier.

@sir.poop:

That wouldn't work because say you are playing three sounds... it would return all those three sounds. I want to keep the dll media player and game friendly.
  • 0

#27 MP2:E

MP2:E

    GMC Member

  • New Member
  • 152 posts

Posted 03 September 2005 - 05:17 PM

You never sease to make this dll even better than it already is do you ::lmao:: :D
  • 0

#28 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 03 September 2005 - 05:22 PM

You never sease to make this dll even better than it already is do you ::lmao::  :D

<{POST_SNAPBACK}>


lol, I'm also going to try my hand at mp3 tags this weekend. I've never done anything like that before, but we'll see how it turns out.
  • 0

#29 Chirantha

Chirantha

    GMC Member

  • New Member
  • 502 posts

Posted 03 September 2005 - 08:18 PM

THis thing realy rooks!!! I am go to make an Midia Payer Sooon. And does this thing stop the GM sound hickup?
  • 0

#30 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 03 September 2005 - 08:40 PM

THis thing realy rooks!!! I am go to make an Midia Payer Sooon. And does this thing stop the GM sound hickup?

<{POST_SNAPBACK}>


Another update! These are the new features..

- Channels (wav-only compatible)
- Bytes per second (again only compatible with wavs)
- Can play (checks if the sound is fully compatible)

I love updating dlls (especially on weekends) ::lmao::!!

And yes should not have any hickup problems.
  • 0

#31 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 04 September 2005 - 12:07 AM

how do i make a name of the mp3 file appear in the gm window? this probablly isn't related to Saudio's possibilites, but still, or is it?

Edited by Shinnoki, 04 September 2005 - 12:20 AM.

  • 0

#32 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 04 September 2005 - 12:36 AM

how do i make a name of the mp3 file appear in the gm window? this probablly isn't related to Saudio's possibilites, but still, or is it?

<{POST_SNAPBACK}>


Do you mean draw the path to the mp3 file? OR just draw the name (Ex: sound.mp3). Or draw nothing at all :whistle:? Sorry I don't reallu understand your question.
  • 0

#33 Who_d3n

Who_d3n

    GMC Member

  • New Member
  • 499 posts

Posted 04 September 2005 - 12:43 AM

He is saying how do you show the file name?
  • 0

#34 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 04 September 2005 - 01:01 AM

He is saying how do you show the file name?

<{POST_SNAPBACK}>


You have to enter a file path in order to load a file... why don't you just use that?
  • 0

#35 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 05 September 2005 - 12:43 AM

I've updated it again! It now can record and save sound directly from the user's microphone. See the recording example!!
  • 0

#36 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 05 September 2005 - 11:02 AM

good job, i eventually figured out how to add mp3 name to the media player's window, it was my mistake, i forgot about filename_name();
EDIT: I already added your recorder support for GMEP ^_^
Check it out
http://forums.gamema...howtopic=154518

Edited by Shinnoki, 05 September 2005 - 12:29 PM.

  • 0

#37 MikSol

MikSol

    GMC Member

  • New Member
  • 2 posts

Posted 05 September 2005 - 01:29 PM

Works this DLL with old version 5.3A ?
Thanks!
  • 0

#38 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 05 September 2005 - 02:20 PM

Works this DLL with old version 5.3A ?
Thanks!

<{POST_SNAPBACK}>


The dll itself should work fine. Use the .gml script library and import it into a .gmd file and your good to go.
  • 0

#39 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 06 September 2005 - 07:28 PM

Andrew, how do I convert the current track time the dll returns into a regular time like 3:50 ???

~GmDude66~
  • 0

#40 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 06 September 2005 - 09:17 PM

Andrew, how do I convert the current track time the dll returns into a regular time like 3:50 ???

~GmDude66~

<{POST_SNAPBACK}>


Well the position returns in milliseconds, so you would have to convert the milliseconds to seconds than the secons to minitues. I tried doing this once but I failed. If anyone can help with this I'd be happy.

Note: I could do the conversion but the seconds would go to 99 instaed of 59, if you know what I mean.
  • 0

#41 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 07 September 2005 - 08:00 PM

Ok, i'm gonna ask around a little bit..
  • 0

#42 arcooke

arcooke

    GMC Member

  • New Member
  • 1055 posts

Posted 08 September 2005 - 01:36 AM

Any chance we're going to see a looping feature anytime soon? That's probably one of the most important features of a gm sound system. ::lmao::
  • 0

#43 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 08 September 2005 - 02:03 AM

Can't you just replay the song once it ends using the current_position feature and track_time feature?

~Derek~
  • 0

#44 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 08 September 2005 - 02:28 AM

Can't you just replay the song once it ends using the current_position feature and track_time feature?

~Derek~

<{POST_SNAPBACK}>


You could but I'll probably put in a loop function once I lean how. Most likely this weekend for sure.
  • 0

#45 arcooke

arcooke

    GMC Member

  • New Member
  • 1055 posts

Posted 08 September 2005 - 05:04 AM

Can't you just replay the song once it ends using the current_position feature and track_time feature?

~Derek~

<{POST_SNAPBACK}>

That would require yet another step event. That's why I'm looking for a DLL to play wavs, to take some of the load off the GM game. I sometimes get minor hiccups when sounds are played.

:lol:

You could but I'll probably put in a loop function once I lean how. Most likely this weekend for sure.

Awesome. I'm looking forward to seeing it. I want to use your DLL because of it's simplicity. I need loopage though. ::lmao::

Edited by adamsucks, 08 September 2005 - 05:06 AM.

  • 0

#46 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 10 September 2005 - 07:57 PM

Here is a script to convert milliseconds into real time such as 3:43.

Written By 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);


~Derek~
  • 0

#47 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 10 September 2005 - 08:19 PM

Here is a script to convert milliseconds into real time such as 3:43.

Written By 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);


~Derek~

<{POST_SNAPBACK}>


Hey, thats really cool :)
  • 0

#48 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 10 September 2005 - 08:27 PM

Thank Shaltif for this =P

Hows it going with the MP3 tags?

~Derek~
  • 0

#49 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 10 September 2005 - 11:49 PM

Major update to v1.0 full. No longer is Saudio a beta. It now fully supports 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

Added Features:
- Play a sound looped
  • 0

#50 arcooke

arcooke

    GMC Member

  • New Member
  • 1055 posts

Posted 11 September 2005 - 12:07 AM

Amazing update. I'll definately be using this. Thanks a ton for listening to our requests :)


With all those new file formats, is this DLL still 100% legal to use commercially? Just curious.
  • 0