Jump to content


Photo

Fmod Sound System Engine


  • Please log in to reply
1037 replies to this topic

#601 zmaj

zmaj

    GMC Member

  • GMC Member
  • 327 posts
  • Version:Unknown

Posted 20 July 2011 - 08:58 AM

Posted 06 July 2011 - 11:25 PM
Yes, there is a fmod option option that allows saving directly to file. nope I'm not adding it. You can use the source to make your own dll if you want.


hm...
Will you put and other involved files with source..
IN source you "invoke" some for me unknown GM related files...

Tnx in advance
  • 0

#602 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 20 July 2011 - 05:06 PM

gmapi is on the gmc... it not needed if you dont use the 2 functions that uses it... simply comment out the gmapi calls and references if you dont want the trouble
  • 0

#603 PhiL Blunt

PhiL Blunt

    GMC Member

  • New Member
  • 112 posts
  • Version:GM:Studio

Posted 21 July 2011 - 10:52 PM

how do i check if a song has ended?

currently trying "if FMODInstanceIsPlaying(global.Song)= 0 .." and have tried FMODInstanceGetPosition.

tia
  • 0

#604 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 21 July 2011 - 11:36 PM

FMODInstanceIsPlaying... you are probably passing a sound instead of an instance if it's not working for you
  • 0

#605 PhiL Blunt

PhiL Blunt

    GMC Member

  • New Member
  • 112 posts
  • Version:GM:Studio

Posted 22 July 2011 - 01:01 AM

i cant seem to get it to work. it works if the test is called before the songs loads, which or course i dont want it to do. so i have an alarm to do the test.
but no matter which way i do it i cant seem to get it to work. i just want the end of the song to signal the end of the room.
do you think you could build a quick example? just to see if the function is working, its prolly my fail.. over tired.
  • 0

#606 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 22 July 2011 - 01:22 AM

See my How do I section in the scripts and in the main post
  • 0

#607 PhiL Blunt

PhiL Blunt

    GMC Member

  • New Member
  • 112 posts
  • Version:GM:Studio

Posted 22 July 2011 - 02:40 AM

sorted, thank you.
  • 0

#608 zmaj

zmaj

    GMC Member

  • GMC Member
  • 327 posts
  • Version:Unknown

Posted 24 July 2011 - 03:14 PM

gmapi is on the gmc... it not needed if you dont use the 2 functions that uses it... simply comment out the gmapi calls and references if you dont want the trouble



Umgh...
After few hard day's I was compile new dll based on your DLL.
I was never work before with Microsoft Visual C++ 2008, so you can imagine my problems. :(
At last... YES !
I was aded output as WavWriter.
but i still have trouble with
gmapiinternal.h
I believe you was there define next:
gm::CGMAPI* gmapi = NULL;
pds_list_add
In a fact, I dont know how you are put a GM commands there.... :(
So, My new dll could't make few commands related to this gm lists...

Idea is to make engine capable to record and play several files at once...
In very this moment I trying to add out_mp3 native Fmod plug_in...
It will be nice, to save one or several sound/'s as *.mp3 directly...

And I haven't still idea how Winamp DSP work... That will be next.
For any else DSP i was found remarks on Fmod forum and manual, but no and for Winamp support... :(

So, Can you help me ?
Please put Gm related files for download ( I am not a C or C++ expert), and I can't find'em on any post here.
Or send me on Email please...

Tnx in advance

EDIT:
Sorry man, I was found at last GmApi... That is whole 20 pages... Oh my...

zmmaj

Edited by zmaj, 24 July 2011 - 03:49 PM.

  • 0

#609 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 27 July 2011 - 02:24 PM

Holy crap !
I just converted my 3MB MP3s to .OGG to make them smaller...
...changed FMODsoundAdd(working_directory"+\Resources\BGM-1.MP3") to
FMODsoundAdd(working_directory"+\Resources\BGM-1.OGG")...
... and FMOD does not load anything... <_< !!!

Proof :

The global var containing the ID of the sound is equal to... 0 !

Edited by NikaB, 27 July 2011 - 02:25 PM.

  • 0

#610 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 27 July 2011 - 10:41 PM

Holy crap !
I just converted my 3MB MP3s to .OGG to make them smaller...
...changed FMODsoundAdd(working_directory"+\Resources\BGM-1.MP3") to
FMODsoundAdd(working_directory"+\Resources\BGM-1.OGG")...
... and FMOD does not load anything... <_< !!!

Proof :

The global var containing the ID of the sound is equal to... 0 !


Hmmm...

Proof is asking FMOD to give you the last error using the support functions
1) do a show_message(FMODErrorStr(FMODGetLastError())) right after the sound add
2) Possibly the ogg is encoded with options not supported. that could be the case. Try different options when converting to ogg.
3) Try to open up the file with VisualMusic? Or in the effect room in the demo
  • 0

#611 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 28 July 2011 - 08:31 AM


Holy crap !
I just converted my 3MB MP3s to .OGG to make them smaller...
...changed FMODsoundAdd(working_directory"+\Resources\BGM-1.MP3") to
FMODsoundAdd(working_directory"+\Resources\BGM-1.OGG")...
... and FMOD does not load anything... <_< !!!

Proof :

The global var containing the ID of the sound is equal to... 0 !


Hmmm...

Proof is asking FMOD to give you the last error using the support functions
1) do a show_message(FMODErrorStr(FMODGetLastError())) right after the sound add
2) Possibly the ogg is encoded with options not supported. that could be the case. Try different options when converting to ogg.
3) Try to open up the file with VisualMusic? Or in the effect room in the demo


show_message(FMODErrorStr(FMODGetLastError()))

RESULT : An invalid object handle was used.

:blink:

EDIT : I used the Vorbis option when converting the mp3 into an ogg. So everything (theorically) must be fine. But it still bugs...

EDIT 2 : Says "failed to load sound" in the demo !

EDIT 3 : When I double click on the ogg to play it by Final Media Player, there is a video pic preview. Nothing just a text : "No video stream in input". Maybe FMOD thinks it's a video ? :wacko:

Edited by NikaB, 28 July 2011 - 08:46 AM.

  • 0

#612 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 28 July 2011 - 08:43 AM

...
RESULT : An invalid object handle was used.

:blink:

Are you sure you called this right after YourSound = FMODsoundAdd(working_directory"+\Resources\ BGM-1.MP3")

Because that error is usually an error for SoundPlay.

And have you tried

3) Try to open up the file with VisualMusic? Or in the effect room in the demo
  • 0

#613 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 28 July 2011 - 08:45 AM

>>EDIT 2 : Says "failed to load sound" in the demo !

Try to load the sound streamed, pass 0 for 3d and 1 for streamed


and send me the original mp3 and .ogg file in a PM so I can report to Firelight about a possible bug.
  • 0

#614 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 28 July 2011 - 08:50 AM

I already tried to do it in my program. 0 for 3d, 1 for streamed. Nothing.
EDIT : I will do all you've said (send the files)
but not right now sorry. I'm a bit lazy :P

EDIT : oh, and yes I called the debug function just after loading the sound.

Edited by NikaB, 28 July 2011 - 09:06 AM.

  • 0

#615 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 28 July 2011 - 05:53 PM

Sln: mp3->ogg... Use audacity; I know this converter works
  • 0

#616 rinkuhero

rinkuhero

    Paul Eres

  • GMC Member
  • 1829 posts
  • Version:GM7

Posted 02 August 2011 - 08:00 PM

question: does FMODSetWorldScale() affect the distance at which a 3d sound can be heard (as i'd expect), or only the doppler effect? let's say my game has different resolutions, and each one has a larger 'view' size (so that at larger resolutions you can see more of the room at once). would it be a good idea to change the world scale for each, so that when the view is larger you can hear things at a greater distance? e.g. if the player uses a resolution 2x normal size, the world scale should be set to 2? or to 0.5?

btw, some of the questions in your question function seem to be outdated. for instance, you write

"Question-Why can I change the pitch of groups but not the pitch of an instance??
Answer-The feature is not included in FMOD, Use the FMODInstanceSetFrequency"

but there actually are functions to change the pitch of an instance, and they do seem to work -- FMODInstanceSetPitch() works from my testing of it

btw2, i know i said i'd send you my game so you can see the water effects and star field etc., i haven't forgotten, i'm just late/lazy, but still will send you the game when it's in a stable state

Edited by rinkuhero, 02 August 2011 - 08:12 PM.

  • 0

#617 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 02 August 2011 - 11:17 PM

question: does FMODSetWorldScale() affect the distance at which a 3d sound can be heard (as i'd expect), or only the doppler effect? let's say my game has different resolutions, and each one has a larger 'view' size (so that at larger resolutions you can see more of the room at once). would it be a good idea to change the world scale for each, so that when the view is larger you can hear things at a greater distance? e.g. if the player uses a resolution 2x normal size, the world scale should be set to 2? or to 0.5?

The distance (for the min max dist of a sound) is in meters. the worldscale reflects how many meters per pixel the movement does.

If a 4 meter car is 32 pixels then the world scale would be 4/32 (I think or is it 32/4)... anyway, I never though of using it to limit the distance based on the view. My guess is, if you want to have you sound heard twice as far, you should probably re-initialize the sounds' min max value. I think new sound instantiated will use the new values.


btw, some of the questions in your question function seem to be outdated. for instance, you write

"Question-Why can I change the pitch of groups but not the pitch of an instance??
Answer-The feature is not included in FMOD, Use the FMODInstanceSetFrequency"

but there actually are functions to change the pitch of an instance, and they do seem to work -- FMODInstanceSetPitch() works from my testing of it

Because the question was posted between 2 versions. I added the former later on

If it's in the main post, I'll remove it

btw2, i know i said i'd send you my game so you can see the water effects and star field etc., i haven't forgotten, i'm just late/lazy, but still will send you the game when it's in a stable state

it's alright. I totally forgot
  • 0

#618 rinkuhero

rinkuhero

    Paul Eres

  • GMC Member
  • 1829 posts
  • Version:GM7

Posted 03 August 2011 - 02:30 AM

thanks for the replies. you're right about FMODSetWorldScale() -- i did some tests and the max/min distance in pixels isn't affected by it just by changing the scale value; i'll try re-initializing min and max to see if that works.

.
  • 0

#619 rinkuhero

rinkuhero

    Paul Eres

  • GMC Member
  • 1829 posts
  • Version:GM7

Posted 03 August 2011 - 11:16 PM

i discovered a bug in FMODGroupFadePitch (and possibly other Fade functions) -- if you set two fades simultaneously or set one fade before another fade has finished fading to the desired pitch (or volume, etc.) it will may reach the correct pitch and just get stuck at a weird pitch forever. the use of those functions isn't necessary for my game and i made do without them, but when i experimented them i encountered numerous problems with using the fading functions. they also seem to go slower than expected -- i would set it to fade to a certain level in, say, 20 frames, but it actually took many more frames than that to reach said level, even if i had no other fades active at the same time
  • 0

#620 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 03 August 2011 - 11:42 PM

Yeah... those are gml coded since FMOD does not have them. I guess I did not test it enough. you can implement your own method easily enough though

at = get volume
dec = volume/numframes

step
at-=dec
set volume at

if(get volume == 0) done
  • 0

#621 -DarkAceZ-

-DarkAceZ-

    GMC Member

  • GMC Member
  • 95 posts
  • Version:Mac

Posted 08 September 2011 - 02:53 AM

I don't know if this is in the right place, but I followed the link from this topic (Which is the same topic) and then clicked "Add Reply". But I have a question:
When you upload your game, does it upload the files that were used in this application? Like if you wanted to make a compressed sound reply gaplessly and then upload it, would it upload the files it used to do that? Or would the downloader have to download that (Fmod Sound System Engine) separately?

Edited by -DarkAceZ-, 09 September 2011 - 12:46 AM.

  • 0

#622 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 08 September 2011 - 03:11 AM

I don't know if this is in the right place, but I followed the link from this topic and then clicked "Add Reply". But I have a question:
When you upload your game, does it upload the files that were used in this application? Like if you wanted to make a compressed sound reply gaplessly and then upload it, would it upload the files it used to do that? Or would the downloader have to download that (Fmod Sound System Engine) separately?

You zip your game and the dlls and the sounds the game needs... Or you use GM's add include file system
  • 0

#623 -DarkAceZ-

-DarkAceZ-

    GMC Member

  • GMC Member
  • 95 posts
  • Version:Mac

Posted 08 September 2011 - 02:02 PM

OK, that's nice!
But now I wonder what I didn't do. I know I need to do something before it works, and obviously I didn't do it yet. When I created the action "Execute Code" I pasted this in it:
threeD = false;
streamed = true;
sound = FMODSoundAdd("music_nucget.mp3", threeD, streamed );
start = 0;
end = 1; 
FMODSoundSetLoopPoints(sound,start,end);
instance = FMODSoundLoop(sound);
(I'm trying to get an mp3 to play gaplessly) But it has a problem with "FMODSoundAdd"...

Here's the error:

COMPILATION ERROR in code action
Error in code at line 3:
   sound = FMODSoundAdd("music_nucget.mp3", threeD, streamed );
           ^
at position 10: Unknown function or script: FMODSoundAdd

I didn't do this,
LoadFMOD();
FMODinit(100);
which I'm guessing that's where I messed up. I'm not sure where to put it though. (I don't know where "game_start" is...)


The four things I did do:
Added sound "music_nucget".
Placed "GMFMODSimple.dll" into C:\Users\<USER>\AppData\Roaming\GameMaker.
Placed "fmodex.dll" into C:\Users\<USER>\AppData\Roaming\GameMaker.
And execute code on the sound object:
threeD = false;
streamed = true;
sound = FMODSoundAdd("music_nucget.mp3", threeD, streamed );
start = 0;
end = 1; 
FMODSoundSetLoopPoints(sound,start,end);
instance = FMODSoundLoop(sound);

  • 0

#624 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 08 September 2011 - 07:00 PM

did you merge the gmk (gm7) or import the resource file (gm8+)?
  • 0

#625 -DarkAceZ-

-DarkAceZ-

    GMC Member

  • GMC Member
  • 95 posts
  • Version:Mac

Posted 08 September 2011 - 10:56 PM

...Uh what? I'm using Gamemaker 8.1...
I downloaded the GMFMODSimpleDemo.zip from here: http://www.host-a.ne...DSimpleDemo.zip (on the first post on this topic) and extracted it, then copied the fmodex.dll file and the GMFMODSimple.dll files from C:\Users\<USER>\Downloads\GMFMODSimpleDemo to C:\Users\<USER>\AppData\Roaming\GameMaker.
I'm not sure if that answers your question...
  • 0

#626 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 09 September 2011 - 12:04 AM

...Uh what? I'm using Gamemaker 8.1...
I downloaded the GMFMODSimpleDemo.zip from here: http://www.host-a.ne...DSimpleDemo.zip (on the first post on this topic) and extracted it, then copied the fmodex.dll file and the GMFMODSimple.dll files from C:\Users\<USER>\Downloads\GMFMODSimpleDemo to C:\Users\<USER>\AppData\Roaming\GameMaker.
I'm not sure if that answers your question...


did you added the resources to your game? GM Menu: File/Import Resources/
Select GMFMODSimple.gmres
Say you want it all imported if it ask. Then you will have the functions and objects
  • 0

#627 -DarkAceZ-

-DarkAceZ-

    GMC Member

  • GMC Member
  • 95 posts
  • Version:Mac

Posted 09 September 2011 - 12:44 AM

"Importing and Exporting of resources is not available in the Lite Edition"... D'oh!!!!!!

Well, if I was allowed I'd upgrade I would, but until then... I can't do this. :|

Edited by -DarkAceZ-, 09 September 2011 - 12:46 AM.

  • 0

#628 HD Blood

HD Blood

    GMC Member

  • GMC Member
  • 14 posts

Posted 09 September 2011 - 02:24 PM

I have the following problem: When I init the FMOD.dll ( FMODinit(7) ) I get a blue screen of death saying: "Physical memory dump". and something about a missing DLL, (I don't remember the DLL name)
When I use a smaller number like: FMODinit(1), my PC sometimes don't crash.. (sometimes!)

Its pretty hard to use this DLL if my PC crash every time!

I have the latest version: V0.4.28.9. I have an old PC with Windows XP, 1024MB RAM, 128MB graphics card...
Sure, you can blame my old PC!.. but when I use this DLL, there's no problem at all! (it used the same FMOD.dll)

Can you solve this problem?
  • 0

#629 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 09 September 2011 - 06:39 PM

I have the following problem: When I init the FMOD.dll ( FMODinit(7) ) I get a blue screen of death saying: "Physical memory dump". and something about a missing DLL, (I don't remember the DLL name)
When I use a smaller number like: FMODinit(1), my PC sometimes don't crash.. (sometimes!)

Its pretty hard to use this DLL if my PC crash every time!

I have the latest version: V0.4.28.9. I have an old PC with Windows XP, 1024MB RAM, 128MB graphics card...
Sure, you can blame my old PC!.. but when I use this DLL, there's no problem at all! (it used the same FMOD.dll)

Can you solve this problem?


Does the demo exe work?
  • 0

#630 HD Blood

HD Blood

    GMC Member

  • GMC Member
  • 14 posts

Posted 10 September 2011 - 07:06 AM

Does the demo exe work?

Back then, nothing works.

But now.. I'm not sure about this, but it seems the problem has solved itself.. I can now even use: FMODinit(1000)? Don't know how long it takes before my PC crash again?

Maybe some of my drivers I installed has solved the problem, but I'm not sure about this, because its a month ago. If my PC crash again, I will report it immediately.

Edited by HD Blood, 10 September 2011 - 07:07 AM.

  • 0




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users