Jump to content


Photo

SG Audio DLL


  • Please log in to reply
113 replies to this topic

#101 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14384 posts
  • Version:GM:Studio

Posted 15 April 2012 - 06:01 AM


The way I read the interface, would you not need 2 emitters to play 2 sounds at the same time?

Well playing two sounds at the same time isn't exactly my problem. The problem is playing the sound again before it has time to finish playing. For example, say the sound is 5 seconds long, and I play it every 2 seconds. In GM, it plays the entire 5 second sound over and over again every 2 seconds. However in SG Audio, as soon as the sound starts playing the sound that is already playing (due to it being 5 seconds long) (which is the same sound, btw) stops playing to give way to the other.

Is your solution to create and destroy an emitter every time I play the sound? Because that is possible, but I'm not sure if it will have a large performance cost.

My solution it to create an emitter for every sound that has multiple instances playing... One that can destroy itself when it's sound is done playing. Pretty sure the reason the sound stops before it starts is because you are using a single emitter. This problem here sounds a lot like GM's native 3d sound limitation, however to OP says it supports multiple playing sounds. But the he states multple sounds can slow your

>>This is an emitter-based system. Which means that sound files don't get loaded into memory twice and all the emitters can (but shouldn't, due to speed limits of every normal game) play something at the same time.

One must guess it's not an optimal setup to play multiple sounds at the same time... But the only way. so try it and see. It they are wav files though, the system should be able to handle it.

On another topic, icuurd12b42, being the creator of GMFMOD, is GMFMOD a better choice for this? (I need 3d sound and the only current sound dlls that support it that I know of are SG Audio and GMFMOD)


Better is a relative thing. I started FMOD wrapper and named it "simple" because it originally offered very limited features but fixed the limits of GM's sound system, like this here. Now it's huge. One thing is for sure. if you can't play multiple instances and control them individually then FMOD may be what you need.
  • 0

#102 Hiric

Hiric

    GMC Member

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

Posted 22 April 2012 - 09:13 PM

I'm posting just to say that the non-debug version of the DLL runs just fine and without any issues.
Probably the debug version was overly verbose and the error I was running into was easy to recover from, or probably just a warning (nothing happened even after 2 hours of intense play. Apparently Posted Image )

Edited by Hiric, 22 April 2012 - 09:14 PM.

  • 0

#103 HeadInjuryGames

HeadInjuryGames

    AKA Suppercut

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

Posted 03 June 2012 - 10:33 PM

My friend, who is running Windows 7 64-bit, is having an error thrown of "Error defining an external function." We confirmed that the plugins are all in the right place and such, and it works on my computer.

Otherwise it does everything I need. Thanks for this simplistic DLL.
  • 0

#104 heyufool1

heyufool1

    Fail

  • GMC Member
  • 1651 posts
  • Version:GM8

Posted 06 June 2012 - 06:09 PM

Great DLL! Works like a charm after I ironed out a few kinks, though I occasionally run into an error when exiting:
Posted Image

It only happens when I exit the game so it's not a huge deal, but it does get annoying because the game doesn't exit properly so I have to end the process (Through the task manager) to get Game Maker back. I can't think of a reason why this is would happen, but I'll keep digging.
  • 0

#105 sisyphus

sisyphus

    GMC Member

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

Posted 06 August 2012 - 11:33 PM

Very useful Dll, thanks snake5
  • 0

#106 sisyphus

sisyphus

    GMC Member

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

Posted 16 August 2012 - 06:23 PM

Great DLL! Works like a charm after I ironed out a few kinks, though I occasionally run into an error when exiting:
Posted Image

It only happens when I exit the game so it's not a huge deal, but it does get annoying because the game doesn't exit properly so I have to end the process (Through the task manager) to get Game Maker back. I can't think of a reason why this is would happen, but I'll keep digging.

I get this error as well!
  • 0

#107 Hiric

Hiric

    GMC Member

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

Posted 09 November 2012 - 06:41 AM

EDIT: SOLVED Posted ImagePosted Image
I had the nightly illumination that GameMaker didn't like the fact that I was disabling and re-enabling one object in the Create event... I hate when errors propagate like that Posted Image
So, no problem with the DLL, it was my (well, sort of) fault Posted Image


Hi Snake5, I've been using your DLL (the non-debug version) for almost 6 months and everything went fine.

Today, I got this:

ERROR 80000003
Posted Image


I was writing code on my project, testing like every minute (Play Game) from inside GameMaker 8.1 Standard.

The only thing that was different is... probably a collision mask sprite that I edited from within the internal editor.
I also didn't save for a few hours, but everything went smooth until *maybe* I decided to save.

There also was a script error in the background, but couldn't get focus on that. I also have a trace log of the crash, but doesn't help that much.


Now, I'm probably going to restore my previously working copy of a few hours before (I just added about 50-100 instances in the room editor, and 3 sprites, 2 of which have been renamed, I also changed a line of code), but I'm a bit worried it could happen again.

Maybe I'm doing something wrong, or maybe it is an internal GameMaker issue.

I believe it's about memory and an unheandled exception. The game wasn't playable, and the sound (OGG) was throttling at full speed (like at 10x speed). I didn't change a single comma about the audio part of the game, so I believe it's more a matter of allocating resources.

Do you have any clue about what could be going on? Any help would be greatly appreciated, thanks in advance for your time.


Edited by Hiric, 09 November 2012 - 01:49 PM.

  • 0

#108 HeadInjuryGames

HeadInjuryGames

    AKA Suppercut

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

Posted 08 December 2012 - 12:16 AM

Now I'm instantaneously getting "Error defining an external function" for absolutely no reason. The DLLs are all together in the right positions, what is wrong?

Using GM8.1 on a Windows XP

EDIT: My bad. I moved the project file, then accidentally loaded the old one when my computer crashed. :sweat:/>

EDIT2: So will there be a function to set automatic loop points?

Edited by HeadInjuryGames, 23 December 2012 - 06:04 AM.

  • 0

#109 Stickman1

Stickman1

    GMC Member

  • GMC Member
  • 21 posts
  • Version:GM8

Posted 28 December 2012 - 07:51 PM

Ohhh I was so ducking scared.
I loaded a .ogg and play it with the background music thingy function, and yes I freed and intialised.
Plays normal,
5 sec later it makes sounds like my PC IS Skynet or a Transformer O_O
Just sound slike this:DIKSNKGNUASDÄLPSIZTU
I was so scarred because I could't end the game too
Just ... WTF happend.
  • 0

#110 snake5

snake5

    GMC Member

  • GMC Member
  • 71 posts

Posted 13 January 2013 - 12:10 AM

In case anyone was having problems with streaming in the previous version, they should be fixed now since I rebuilt the system.

P.S. Sorry for disappearing like that for a year, it's kind of tough having a job and maintaining other software at the same time.

Edited by snake5, 13 January 2013 - 12:12 AM.

  • 3

#111 Gorkiller

Gorkiller

    GMC Member

  • GMC Member
  • 142 posts
  • Version:GM8

Posted 23 January 2013 - 02:09 AM

In case anyone was having problems with streaming in the previous version, they should be fixed now since I rebuilt the system.

P.S. Sorry for disappearing like that for a year, it's kind of tough having a job and maintaining other software at the same time.


Thanks for bothering fixing this! I quit Supersound.dll because it threw errors at the end of the game, and I quit FMODSimple because I intended on selling my games. Thanks I will definitely credit you :)

Edited by Gorkiller, 23 January 2013 - 02:11 AM.

  • 0

#112 HeadInjuryGames

HeadInjuryGames

    AKA Suppercut

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

Posted 07 February 2013 - 09:16 PM

Excellent DLL, mate. So can you add a setting for automatic loop points for an emitter (i.e. looping back to a specific part of the song when it ends instead of looping back to the beginning, while still playing the first part of the song when first played)?
  • 0

#113 Jake Armstrong

Jake Armstrong

    GMC Member

  • GMC Member
  • 390 posts

Posted 09 February 2013 - 01:26 AM

This DLL is still awesome!

I was writing my own music cycling system. I couldn't find a way to tell if a sound had finished playing, so I wrote a "hack":
Set the sound to be looping.
Every so often, record the position of the sound.
If the position is earlier than it was before, then the sound looped and must have finished playing.

I don't know if that will help anyone, but whatever :P
  • 1

#114 Alamantus

Alamantus

    GMC Member

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

Posted 20 March 2013 - 05:41 PM

I hope this isn't a necropost, but I really want to use this. I'm on GM: Studio, which I read was compatible, and when I try to use the DLLs (even in the sample .gmk's), I get the following error before the game even executes:
Error : Exception : System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck)
   at System.IO.Path.GetDirectoryName(String path)
   at GMAssetCompiler.IFFSaver.WriteDataFiles(IList`1 _data, Stream _s, IFF _iff)
   at GMAssetCompiler.IFFChunkHandler`1.Save(Stream _stream, IFF _iff)
   at GMAssetCompiler.IFF.WriteChunks(Stream _stream)
   at GMAssetCompiler.IFFSaver.Save(GMAssets _assets, Stream _stream, List`1 _extraFilenames)
   at GMAssetCompiler.IFFSaver.Save(GMAssets _assets, String _name)
   at GMAssetCompiler.Program.Main(String[] _args)
 
 
What do I need to do to fix this? The files are in the "Included Files" section of the project, and everything should be pointing correctly...

EDIT: I learned that this error is not related to SGAudio, but is instead a bug with the Included Files system in GM Studio. If you try to make a folder in Included items and then drag something to the folder from the Game Maker interface, it freaks out because it thinks you moved the file, but the file in /datafiles (or whatever the folder is) did not move where you told it to (i.e. into the folder. You need to delete the files you tried to move from within GM and re-add them to get them to work again.
So glad SGAudio works though!!

Edited by Alamantus, 21 March 2013 - 01:28 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users