Jump to content


Photo

SG Audio DLL


  • Please log in to reply
113 replies to this topic

#21 snake5

snake5

    GMC Member

  • GMC Member
  • 71 posts

Posted 25 April 2011 - 04:26 PM

If you come up with one, let me know, so I can use it.

I have an idea, so I'll probably write it down soon and update the library.

Currently when you play a sound (a sound fx type) repeatedly, the sound itself gets 'restarted' and not being layered (GM's built-in sound system layers ('chorus') sounds when repeatedly played). In other words, the sound isn't 'multishot'. It would be nice if you add a 'multishot' option for soundfx types (In the old GM 5.3a that option is called 'buffers') I hope you would consider this

Since it's possible to implement this feature in scripts with the existing system, I'll probably write them quite soon.
  • 0

#22 grugin

grugin

    GMC Member

  • GMC Member
  • 116 posts

Posted 26 April 2011 - 09:07 AM

Thank you, a great alternative to the supersound dll ! It works really well with gm 8.1 ! Cool, the sound is coming back :)
  • 0

#23 Dom83

Dom83

    GMC Member

  • GMC Member
  • 138 posts

Posted 27 April 2011 - 09:59 PM

Hi, I have this error just running the sg audio test kit : alcOpenDevice failed - default device could not be opened. Do you want to continue without sound ?
I thought your dll was just not compatible with GM8.1 but I read it is. I wonder what is the problem then. My audio card is an E-Mu 0404 (which sure works) and I am running WinXP Pro.
  • 0

#24 snake5

snake5

    GMC Member

  • GMC Member
  • 71 posts

Posted 28 April 2011 - 04:23 AM

Dom83:
That should be only the case when the sound card does not support any kind of audio output. But I'll check my code - perhaps I haven't written it in the right way for this to be true. The other possibility is a bug in OpenAL though so let's hope I've made the mistake. :D

P.S. To those who requested different features, I have to say that I've unfortunately had lots of work to do and I haven't been able to implement many of those features in any way. I didn't forget about them and will try to make at least some of those as soon as finish adding important updates to my engine.

Edited by snake5, 28 April 2011 - 04:27 AM.

  • 0

#25 Bleed

Bleed

    Chevalier

  • GMC Member
  • 659 posts
  • Version:GM8.1

Posted 29 April 2011 - 06:03 PM

Waiting anxiously on that bug fix mr. snake Posted Image

Edited by Bleed, 29 April 2011 - 06:09 PM.

  • 0

#26 snake5

snake5

    GMC Member

  • GMC Member
  • 71 posts

Posted 30 April 2011 - 01:03 AM

Waiting anxiously on that bug fix mr. snake Posted Image

Fixed it now. Playing, at least. I don't exclude the possibility of having some problems with timing but everything should be +/- OK now.
You can get the DLL in the newest version of the SDK.

To those who want to update their DLLs: don't take them from the test kits/samples. They aren't updated in those archives. The only way to get the newest version is to download the SDK. Shouldn't be much of a problem since SDK is the smallest of all those downloads anyway. :)

Edited by snake5, 30 April 2011 - 01:03 AM.

  • 0

#27 Dom83

Dom83

    GMC Member

  • GMC Member
  • 138 posts

Posted 30 April 2011 - 01:23 AM

Wow you were quick to update it. It works for me now. ;)

edit : Er, in deed SGATest.exe with the updated dll now works, but in GM it still telling me the error message, even for your SGATest.gmk . I copied the updated dll though. How come ?

Edited by Dom83, 30 April 2011 - 02:01 AM.

  • 0

#28 snake5

snake5

    GMC Member

  • GMC Member
  • 71 posts

Posted 30 April 2011 - 04:14 AM

Dom83, do you have all the DLLs together with the .exe / Game Maker source file? This is the only possible difference I can think of at the moment.
  • 0

#29 Dom83

Dom83

    GMC Member

  • GMC Member
  • 138 posts

Posted 30 April 2011 - 07:46 PM

Yes, I even copied the SGATest.gmk in the same folder as SGATest.exe . SGATest.exe works, SGATest.gmk gives me an error message... :mellow: I deleted all the scripts in SGATest.gmk and imported the updated gml, in case you updated it, but the error message keeps displaying.

edit : I noticed something strrange, if I create an exe then this exe works, but the editable still doesn't... :blink:
  • 0

#30 snake5

snake5

    GMC Member

  • GMC Member
  • 71 posts

Posted 01 May 2011 - 06:07 AM

It's probably a GM 8.1 bug then.
Setting the correct path to DLL manually (changing the "nm" variable in sga_Init) before everything else could help with testing.

P.S. Anyone knows where could I report bugs?

Edited by snake5, 01 May 2011 - 06:07 AM.

  • 0

#31 Dom83

Dom83

    GMC Member

  • GMC Member
  • 138 posts

Posted 01 May 2011 - 01:54 PM

I included your dlls to my game as ressources and told it to put them in temp folder, then I changed paths in script to
temp_directory + "\SGAudio.dll"
But no change, I still have the error though when I create an exe it works.

To report bugs : http://bugs.yoyogame.../login_page.php but it seems that I am the only one having this problem so they may not be able to recreate this bug.
  • 0

#32 snake5

snake5

    GMC Member

  • GMC Member
  • 71 posts

Posted 01 May 2011 - 03:19 PM

I think you should still report it, with all the specific data about your software configuration - someone has to start looking into it and it looks like we cannot do anything from here. :(
  • 0

#33 thomasderoo

thomasderoo

    GMC Member

  • New Member
  • 54 posts

Posted 18 May 2011 - 07:44 AM

saved my ass right there,

I was using fmod when i found out i needed a license to sell anything i make with it. i found this and im sooo happy :). it works almost the same so porting was not a big problem :)

thank you,
  • 0

#34 thomasderoo

thomasderoo

    GMC Member

  • New Member
  • 54 posts

Posted 20 May 2011 - 09:37 AM

and also, all of the dlls can be placed in an external folder. with fmod, the fmodex.dll needs to be in the working directory, else it wouldnt work. thats just one more reason to use this instead of fmod
  • 0

#35 Jaycliff

Jaycliff

    GMC Member

  • New Member
  • 8 posts

Posted 30 May 2011 - 04:43 AM

This dll will completely replace the default gm sound system if it features sound effects like reverb, chorus, multishot sounds, etc. :)
  • 0

#36 DackR

DackR

    GMC Member

  • New Member
  • 7 posts

Posted 01 June 2011 - 12:15 AM

Big thanks to snake5 for making and compiling this DLL package. I've been able to map a lot of the functions I was using with SuperSound over to SG Audio.

I've started using your module since there are yet issues with GM8.1 and SS, I haven't come across any problems with SG Audio in GM 8.1. Though, I haven't been able to mirror the full functionality of SuperSound yet.

It would be great if you added more functions to return the current audio settings for an emitter (other than GetVol, GetType, IsPlaying, GetPlayOffset -- which are great). Matching functions for all of the 'Set' commands (like GetPanning, IsLooping, GetPitch, etc) would be a great way for those still using SuperSound to make the switch easier. Maybe I'll even post my GML that maps the SG Audio Functions with the matching 'SS_' function. Soo...If you make an updated version, I'll help to ease the transition for other SuperSound users. :)

Just a thought.


Oh- one more thing. I got an error message stating that 'alut.dll' cannot be found. (I even got this error after downloading your SDK.) To fix it, I grabbed the dll from the latest FreeSL package... I'm sure it's available elsewhere as well. Just wanted to make sure you were aware... Thanks again.

Edited by DackR, 01 June 2011 - 12:39 AM.

  • 0

#37 snake5

snake5

    GMC Member

  • GMC Member
  • 71 posts

Posted 01 June 2011 - 01:35 AM

This dll will completely replace the default gm sound system if it features sound effects like reverb, chorus, multishot sounds, etc.

Multishot is planned to be a part of the SG Audio Utility Toolkit scripts. I could probably implement effects like reverb and the low pass filter some day but I can't guarantee that it will happen anytime soon.

It would be great if you added more functions to return the current audio settings for an emitter

There's a good reason why I haven't done that. Panning is a cheap hack and is not guaranteed to work in every situation. It works by setting 3D data with special algorithms that emulate panning. Due to the current limitations of OpenAL, I couldn't implement it naturally. Therefore, the returned panning value can be misleading. I didn't implement IsLooping because this helps the developer to develop a healthy habit of making sure that the sound is initialized properly. Though if I find a situation where checking if looping is enabled actually helps, I will implement it. It's similar with GetPitch in the way that pitch is usually controlled by something else and that thing is usually correlated to the pitch of the sound and thus there's usually no need to retrieve the same data from the DLL. That's a lot of assumptions but they all come from my experience. :D

I made this DLL specifically with games in mind - they use everything OpenAL has to offer, they don't care about panning, they have high volume control requirements and sound management is supposed to be simple. That means three things: 1) if someone wants to make a music player out of this DLL, there's probably a better one for that kind of work out there; 2) true panning will not be implemented at least until the developers of OpenAL decide that it's necessary; 3) this DLL will probably never be a perfect replacement for the SuperSound DLL.

I got an error message stating that 'alut.dll' cannot be found.

There's something seriously wrong. I removed ALUT a long time ago and I have never linked my DLL to the DLL version of that library. And Dependency Viewer doesn't show any links to alut.dll here. Is there any chance that the error came from something else? (including any specialized versions of OpenAL renderers you might have installed..)
  • 0

#38 DackR

DackR

    GMC Member

  • New Member
  • 7 posts

Posted 01 June 2011 - 04:00 AM

I got an error message stating that 'alut.dll' cannot be found.

There's something seriously wrong. I removed ALUT a long time ago and I have never linked my DLL to the DLL version of that library. And Dependency Viewer doesn't show any links to alut.dll here. Is there any chance that the error came from something else? (including any specialized versions of OpenAL renderers you might have installed..)


Thanks for the quick response. I found the problem. Looks like I had another version of OpenAL.dll installed in the windows\system32 folder and it was taking control. I removed it and now I don't need alut.dll. ;) Sorry to alarm you for nothing.

About the emitter state return functions: I'm glad you've thought this out so well. :) I'm sure if anyone 'really' needed those functions, they could manage it in their own code. I completely agree, no need to implement features that will only serve to mislead or confuse.

I have no further suggestions, only my complements!

Cheers!

Edited by DackR, 01 June 2011 - 04:09 AM.

  • 0

#39 Tkachov

Tkachov

    GMC Member

  • GMC Member
  • 22 posts

Posted 13 June 2011 - 03:29 PM

Hello =)
I've found this dll today, 'cos I've searched to an alternative for supersound.dll. I've added it to my game, and it works great...
But I need to change playing position (really, I just write position to a file and then load it; and music must begin from this position).
I've tried to use sga_SetPlayOffset() script, but instead playing music it just looping one small (about one second duration) piece of music.

This code loop beginning of music:
//LoopTrack(filename, pos);
sga_TrackPlay(global.music, argument0, 1, 0);
if(argument_count>1){sga_SetPlayOffset(global.music,argument1);}

This code loop small piece, that begin at <pos>:
//LoopTrack(filename, pos);
sga_TrackPlay(global.music, argument0, 1, 0);
sga_Stop(global.music);
if(argument_count>1){sga_SetPlayOffset(global.music,argument1);}
sga_Play(global.music);

So, how should I use this script to run sound from specific position?

Edited by Tkachov, 13 June 2011 - 04:08 PM.

  • 0

#40 Bleed

Bleed

    Chevalier

  • GMC Member
  • 659 posts
  • Version:GM8.1

Posted 13 June 2011 - 06:46 PM

So i did another test and came up with a few more issues:
-First of all, cpu ussage when using the dll increases by at least 4%, it skyrockets to +15-20% when playing a sound, its probably OpenAL's fault, so not sure you have much control over that, it could just be for small length files only.
-Second the sga_SetGroupVol(master_team0,vol) doesn't work.

Tested on 7SP1,P4 3.0 and GM8.0

P.S : The bug i reported seems to have been fixed, awesome work on that.

Good work on developing this dll i really like it, good alternative over Super Sound that stopped receiving updates a long time ago, and it still had some crucial bugs in it.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users