Re: FMOD with Resonance Audio in Csharp

2019-04-24 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Oh! Interesting, very interesting!So, first. You should upload the code to a git repository; is more easy share it, track the changes, push new code, and other things So, about the code itself...How can work that struct distribution?Checking the same struct in to the fmod source code, the variables that are a triplet (like position x, position y and position z) instead to be three different variables, are an array of size 3. Curious that it can work having  a different structure.Of course, if you reduce bot structures to bytes, probably you got the same result  but well. You do it... Awesome So, if you check my code, apparently you got a different way to dump the struct in to a byteArray; in my case I used other code. But we got the same result So, I suppose that a good next step is get a small program that use bot plugins and can change it properties dynamically.The only sad of resonance audio, is that you can't have various rooms with exits, or different configurations. you have to configure your engine to change the ambience when well, your character enters in to a different ambient.Thanks Lightsome for your work. We got a complete example using resonance audio in c# Now, is time to merge bot works in to one big example ¡thanks!

URL: https://forum.audiogames.net/post/429173/#p429173




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-24 Thread AudioGames . net Forum — Developers room : lightsome via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

That's really a good message. I almost went crazy from infinite testing and searching... I'll try your solution as soon as possible. And in addition, I also made some progress with setting the room properties. Here is my demo. https://1drv.ms/u/s!AkQiPnyu5PNtgvw88_UEZrkRXjmMBATry it and play with all the parameters.My demo should sound like you were standing in front right corner of an empty middle-sized room with concrete walls and a big window behind you.We should keep investigating as long as we fully understand to the API. Whanks for cooperation.

URL: https://forum.audiogames.net/post/429040/#p429040




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-23 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

OK guys, finally is working.After fight with the variables, the parameters and other invisible stuff, with the appreciated help of cameron from from the FMOD forum, we got that this shit works But well, currently the example works just instantiating a sound source, and don't set any listener / room properties yet; Will be a work for the future.So, the repository of the working project (using FMOD 1.10.12) is this:https://github.com/sanslash332/fmod-test-in-monogameIn the solution are included the header project for FMOD 1.10.12 and for 2.0. A, and ilegally (for now) the DLLS of fmod.Probably if you reference from the monogame project the project of the fmod 2.0, after change two or three small things, it works too.@lightsome please try it, and tell me if it works for you See ya!

URL: https://forum.audiogames.net/post/428943/#p428943




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-18 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@26, for extradriverdata? That does not take any form of an enum. If it took an enum, its tye signature would not be IntPTR, now would it? Just pass new IntPTR(0) to that function since you do not have any extra driver data that you need to throw around.

URL: https://forum.audiogames.net/post/427663/#p427663




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-18 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Is the same result, only in a different way.But well  probably (IntPtr)0 works well too.My problem wasn't know how to create a pointer to 0... the problem was know what was the correct value. So, use the enum is a more explicit way to know what are you putting on that parameter So, same for other options; if you want, you can pass any intPtr value depending the value that you want, instead of use the enum.. But of course, the enum is for be more explicit.

URL: https://forum.audiogames.net/post/427637/#p427637




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-18 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@24, I'm surprised you haven't researched this yourself. If you can't pass null or 0 directly to the value, then manually construct it: new IntPtr(0).

URL: https://forum.audiogames.net/post/427575/#p427575




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@ethin... the result is the same...Better explicit it, so you can remember what mean that 0.But... well.Lets go to continue with this experiments.

URL: https://forum.audiogames.net/post/427521/#p427521




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@22, if you can't pass null to an intPtr, then just pass 0 for nothing.

URL: https://forum.audiogames.net/post/427474/#p427474




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Hello @ethin again!Ok, lets do this! I love these discussions about programming 1. Nope! You can't pass null when the required object is a IntPtr.IntPtr is a value type, instead a reference type. you can't use null in a value type... except if it was declared with a "?" but it isn't the case.The error code that is thrown when you put null instead a value is:Error    CS1503    Argumento 3: no se puede convertir de '' a 'IntPtr'    Sorry for the Spanish; My ide is in that languaje and I want put  literally the thrown error.2. yep, I know, but... add the listener DSp to each dynamic source that is created?U...Is better create a channel group, add the sources to that channel and forget and be happy.But I take your suggestion and commented it, and put every thing in to the master channel group.3. yep! It have more than one.I tested it again, following your words, and if you use directly the handler after load the plugin, you get the first plugin. On this case, Listener plugin.You have to use get nested plugin to get  soundfield and source.5. yep, I removed it.6. huh?I don't have it in t same variable; I have a variable for each handler, and  for each plugin o-o.And the plugins that I know that I need again, are set as a class variable.Of course this is a garbage code only for testing, and this must be refactored and other stuf... but for know, we want that it works xd.Ok! more news.I updated the repo with... new stuff... Again I upgraded it to the v2.0 for the last attempts, and I got pass to the source plugin the 3d atributes Is really a rolling nightmare do that; you have to set your struct, with the atributes and their vectors that you want, after marshal your struct to an byte array, and finally pass it to the plugin with the function that @nyanchan said. setParameterData.Checking the source of resonance audio fmod plugin, the index for that data is 8... (I previously tried with other numbers and returns and invalid parameter exception).Well, the result of that... is... ¡no sound!previously we had a sound. centered an boring sound, but sound. Now, the sound is muted, but when you calls play, it didn't  threw an error, so... The arguments are incorrect, the data didn't have correct numbers, or the source is OK, but can't works with listener room properties uff.Well, this  is going forward. slowly, but forward.Thanks again @ethin for your help.

URL: https://forum.audiogames.net/post/427469/#p427469




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@20, I still find your post confusing, but shall attempt to reply to each point.1. You pass null. If you have nothing to pass to a parameter that is required, null is your friend.2. Fair enough. However, you do know you can add DSPs to individual channels, right? Sure its harder, but hey...3. I didn't know it had multiple plugins. I need to update my program to get more info than it already does if that's the case.4. Excellent. This means its at least loading; I thought it was erroring out because you were using relative paths, and sine the plugin path is set to the plugins directory, I think, by default anyway... yeah, I stand corrected.5. Again, a no-op. You already have a single listener by default.6. If you need to get nested plugins, store them in separate variables and don't override the main plugin handle. Store everything as class variables (hell, why not an array). If you loose the main plugin handle, then it will take an extra call to unload it when your done with it.

URL: https://forum.audiogames.net/post/427455/#p427455




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Hello @ethin again:The code that is posted on these threads is old code.In the most resent version, I checked all the calls to fmod functions, and any of these throws a error. this is the repository where I uploaded the code:https://github.com/sanslash332/fmod-test-in-monogameNow, lets go point by point:1. about the init: you can't omit the extradriverdata.If you see again the signature that you post, for c# all the parameters must be present; any of them have a default value. checkpublic RESULT init(int maxchannels, INITFLAGS flags, IntPtr extradriverdata)So, if you don't pass a value for one of them, throws a compilation error.And, in c# for the different sound system, you have a enum for that:public enum OUTPUTTYPE : int    {        AUTODETECT,      /* Picks the best output mode for the platform. This is the default. */        UNKNOWN,         /* All - 3rd party plugin, unknown. This is for use with System::getOutput only. */        NOSOUND,         /* All - Perform all mixing but discard the final output. */        WAVWRITER,       /* All - Writes output to a .wav file. */    ...So, if put the outputType is incorrect (and cast it to a intPTR) whitch value do you have to put on that parameter?you can't omit it.2. The idea is have a separate channelgroup (than the master channel) to put and use the listener plugin.If you attach it directly to the masterChannel, all your sounds will pass through that DSP. So, if you want have a world sounds with the 3d effect applied, plus a other plain sound for example a music, you need a separate channel group to put in one the sounds that  will be spatialiced and other where the sounds pass directly.But for the minimal example, really isn't necessary have that. OK3. In the current version of the code (check the repo) I have error checking and load the plugin didn't throws any error. returns OK.About the nested plugin, this is because the resonance audio plugin have more than one plugin itself.listenerDSP soundfieldDSP and sourceDSP, so you have to extract it from the main plugin.The handle that i get only get to me the entry point to the main point of the plugin. no to the specific diferents dsp.5. I have the error checking now, and loads fine, inclusive after that i can get the info of the new loaded plugin.6. desperate situations, need desperate solutions. :V 7. what is wrong with the call?setListenerAtributes don't exist on the headers, only set3DListenerAttributesThe 0 means the first listener (we have 1) the pos can be a random vector if you want test somethin, in this case only a panning to the right, the listener is without movement (vel in 0) and forward and up are completely ortogonal.Forward pointing in the y axis, and up in to the z axis.What is the problem with that call?And OK So I only use a custom channel group to not apply the listener to the master channel group, but well.So, in the current version I added a error checker, for all the calls to the fmod, and any of them throws an error.but well.For now, the only that I have, is that in the 2.0 I can't get the parameter details of the plugin and nested plugins, and in the 1.10.12 yes. thanks for your check.

URL: https://forum.audiogames.net/post/427450/#p427450




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@18, I found your entire post incredibly confusing. I do not believe the way your using FMOD in that forum post is even the right way to use it, which is most likely what is causing you problems. You use several functions incorrectly, from what I can see. I.e.: system.Init. Here is its signature:RESULT System.init(
  int maxchannels,
  INITFLAGS flags,
  IntPtr extradriverdata
);As the FMOD manual notes:extradriverdata OptAdditional FMOD_OUTPUTTYPE specific initialization data.That does not mean you throw an output type in there as a pointer, it means you specify extra driver data for the output type you want to use (which is later specified after you've initialized the system). As of FMOD 2.00.00, this only takes a filename, which is only for the non-realtime and realtime WAV output types. Other than that, this parameter is unused at this time on windows at least. Previously, when direct sound was still supported, if you wanted to use that you would've needed to pass it an HWND handle.Second, there is no need for a channel group. A channel group is not designed to be used in the way your trying to use it. A channel group is for controlling several channels at once (i.e. adding a DSP to 5-100 different channels simultaneously, controlling master volumes for all of those channels, and so on). Usually you would want to not do this unless in special circumstances.Third, if I understand the FMOD plugin path documentation right, the plugin isn't loading. So far as I can tell you do *no error checking* in this code. And that is most likely where your issue lies. FMOD does not throw exceptions or call abort() when an error occurs, that's what the result is for, and you should check that either on every FMOD function call (and I do mean *every*) or set an error callback after initialization.Fourh, why are you calling fmod.getNestedPlugin()? This is entirely unnecessary. FMOD_System_LoadPlugin() places, within the out variable you indicate, a handle which you use for DSP calls. Calling fmod.getNestedPlugin() serves no purpose; stored the out handle in a clas variable if you need it across function boundaries.Fifth, your fmod.createDSPByPlugin() function call fails because the handle you pass it isn't valid. Again, no error checking.Sixth, you call fmod.set3DNumListeners(). This call functions as a no-op because this is already set to the value you passed in -- 1.Seventh, again, you call fmod.set3DListenerAttributes(). Keep in mind the signature of fmod.set3DListenerAttributes():RESULT System.set3DListenerAttributes(
  int listener,
  ref VECTOR pos,
  ref VECTOR vel,
  ref VECTOR forward,
  ref VECTOR up
);And the parameter descriptions for that function:listenerListener ID in a multi-listener environment. Specify 0 if there is only 1 listener.Range: [0, FMOD_MAX_LISTENERS]pos OptPosition in 3D space used for panning and attenuation. (FMOD_VECTOR)Units: Distance unitsvel OptVelocity in 3D space used for doppler. (FMOD_VECTOR)Units: Distance units per secondforward OptForwards orientation. (FMOD_VECTOR)up OptUpwards orientation. (FMOD_VECTOR)The forward and up vectors must be perpendicular and be of unit length (magnitude of the vector should be 1).Vectors must be provided in the correct handedness.Users of the Studio API should call Studio::System::setListenerAttributes instead of this function.I could go on. But add my suggestions and FMOD should teach you where the problems actually are (though its errors can be a bit confusing).As for your very first question, as far as I know, FMOD does not support HRTF. Also, while channel groups may sound nice, I have not once used a channel group (and I've written programs that play hundreds of sounds simultaneously).

URL: https://forum.audiogames.net/post/427440/#p427440




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@18, I found your entire post incredibly confusing. I do not believe the way your using FMOD in that forum post is even the right way to use it, which is most likely what is causing you problems. You use several functions incorrectly, from what I can see. I.e.: system.Init. Here is its signature:RESULT System.init(
  int maxchannels,
  INITFLAGS flags,
  IntPtr extradriverdata
);As the FMOD manual notes:extradriverdata OptAdditional FMOD_OUTPUTTYPE specific initialization data.That does not mean you throw an output type in there as a pointer, it means you specify extra driver data for the output type you want to use (which is later specified after you've initialized the system). As of FMOD 2.00.00, this only takes a filename, which is only for the non-realtime and realtime WAV output types. Other than that, this parameter is unused at this time on windows at least. Previously, when direct sound was still supported, if you wanted to use that you would've needed to pass it an HWND handle.Second, there is no need for a channel group. A channel group is not designed to be used in the way your trying to use it. A channel group is for controlling several channels at once (i.e. adding a DSP to 5-100 different channels simultaneously, controlling master volumes for all of those channels, and so on). Usually you would want to not do this unless in special circumstances.Third, if I understand the FMOD plugin path documentation right, the plugin isn't loading. So far as I can tell you do *no error checking* in this code. And that is most likely where your issue lies. FMOD does not throw exceptions or call abort() when an error occurs, that's what the result is for, and you should check that either on every FMOD function call (and I do mean *every*) or set an error callback after initialization.Fourh, why are you calling fmod.getNestedPlugin()? This is entirely unnecessary. FMOD_System_LoadPlugin() places, within the out variable you indicate, a handle which you use for DSP calls. Calling fmod.getNestedPlugin() serves no purpose; stored the out handle in a clas variable if you need it across function boundaries.Fifth, your fmod.createDSPByPlugin() function call fails because the handle you pass it isn't valid. Again, no error checking.Sixth, you call fmod.set3DNumListeners(). This call functions as a no-op because this is already set to the value you passed in -- 1.Seventh, again, you call fmod.set3DListenerAttributes(). Keep in mind the signature of fmod.set3DListenerAttributes():RESULT System.set3DListenerAttributes(
  int listener,
  ref VECTOR pos,
  ref VECTOR vel,
  ref VECTOR forward,
  ref VECTOR up
);And the parameter descriptions for that function:listenerListener ID in a multi-listener environment. Specify 0 if there is only 1 listener.Range: [0, FMOD_MAX_LISTENERS]pos OptPosition in 3D space used for panning and attenuation. (FMOD_VECTOR)Units: Distance unitsvel OptVelocity in 3D space used for doppler. (FMOD_VECTOR)Units: Distance units per secondforward OptForwards orientation. (FMOD_VECTOR)up OptUpwards orientation. (FMOD_VECTOR)The forward and up vectors must be perpendicular and be of unit length (magnitude of the vector should be 1).Vectors must be provided in the correct handedness.Users of the Studio API should call Studio::System::setListenerAttributes instead of this function.I could go on. But add my suggestions and FMOD should teach you where the problems actually are (though its errors can be a bit confusing).As for your very first question, as far as I know, FMOD does not support HRTF.

URL: https://forum.audiogames.net/post/427440/#p427440




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@18, I found your entire post incredibly confusing. I do not believe the way your using FMOD in that forum post is even the right way to use it, which is most likely what is causing you problems. You use several functions incorrectly, from what I can see. I.e.: system.Init. Here is its signature:RESULT System.init(
  int maxchannels,
  INITFLAGS flags,
  IntPtr extradriverdata
);As the FMOD manual notes:extradriverdata OptAdditional FMOD_OUTPUTTYPE specific initialization data.That does not mean you throw an output type in there as a pointer, it means you specify extra driver data for the output type you want to use (which is later specified after you've initialized the system). As of FMOD 2.00.00, this only takes a filename, which is only for the non-realtime and realtime WAV output types. Other than that, this parameter is unused at this time on windows at least. Previously, when direct sound was still supported, if you wanted to use that you would've needed to pass it an HWND handle.Second, there is no need for a channel group. A channel group is not designed to be used in the way your trying to use it. A channel group is for controlling several channels at once (i.e. adding a DSP to 5-100 different channels simultaneously, controlling master volumes for all of those channels, and so on). Usually you would want to not do this unless in special circumstances.Third, if I understand the FMOD plugin path documentation right, the plugin isn't loading. So far as I can tell you do *no error checking* in this code. And that is most likely where your issue lies. FMOD does not throw exceptions or call abort() when an error occurs, that's what the result is for, and you should check that either on every FMOD function call (and I do mean *every*) or set an error callback after initialization.Fourh, why are you calling fmod.getNestedPlugin()? This is entirely unnecessary. FMOD_System_LoadPlugin() places, within the out variable you indicate, a handle which you use for DSP calls. Calling fmod.getNestedPlugin() serves no purpose; stored the out handle in a clas variable if you need it across function boundaries.Fifth, your fmod.createDSPByPlugin() function call fails because the handle you pass it isn't valid. Again, no error checking.Sixth, you call fmod.set3DNumListeners(). This call functions as a no-op because this is already set to the value you passed in -- 1.Seventh, again, you call fmod.set3DListenerAttributes(). Keep in mind the signature of fmod.set3DListenerAttributes():RESULT System.set3DListenerAttributes(
  int listener,
  ref VECTOR pos,
  ref VECTOR vel,
  ref VECTOR forward,
  ref VECTOR up
);And the parameter descriptions for that function:listenerListener ID in a multi-listener environment. Specify 0 if there is only 1 listener.Range: [0, FMOD_MAX_LISTENERS]pos OptPosition in 3D space used for panning and attenuation. (FMOD_VECTOR)Units: Distance unitsvel OptVelocity in 3D space used for doppler. (FMOD_VECTOR)Units: Distance units per secondforward OptForwards orientation. (FMOD_VECTOR)up OptUpwards orientation. (FMOD_VECTOR)The forward and up vectors must be perpendicular and be of unit length (magnitude of the vector should be 1).Vectors must be provided in the correct handedness.Users of the Studio API should call Studio::System::setListenerAttributes instead of this function.I could go on. But add my suggestions and FMOD should teach you where the problems actually are (though its errors can be a bit confusing).

URL: https://forum.audiogames.net/post/427440/#p427440




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Well, thanks @ethin for your feedback. So... using only fmod built-in functions do you get play sounds with 3d and HRTF effect? or not.So, about the "set3d" functions, for listeners and channels:yes, I've read the documentation. Various times, but check this two topics. The first is mine, from a few days, and the other is for c++ from middle of 2018:https://qa.fmod.com/t/c-unable-to-ear-s … udio/14546https://qa.fmod.com/t/unable-to-setup-r … -api/13950If you see, Cameron says that the 3d functions of fmod aren't compatible yet with the plugin, and any data that you want to pass to it, you have to send through the parameters.So, and the plugin have 3 DSPPlugins on it; the listener (the plugin that you get an show in your last post) sounAmbient (If i'm not wrong on the name) and source.Well, is interesting. checking the headers of fmod v2, the properties of _3d_atributes (renamed as atributes_3d in 2.0) are now public, so you can instantiate it without problem.But, you can't get the description of the DSP and their parameters of the plugin in the 2.0... their got pure extrange symbols. Well, time to investigate some more thanks ethin again.

URL: https://forum.audiogames.net/post/427420/#p427420




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Update: OK, so I have this little program laying around that I wrote to get parameters for things like VSTs and DSPs. Its a bit out of date since it uses FMOD 1.10.11, I think, or something like it, but its close enough. Here's the information it gave on the Resonance Audio plugin:Plugin: Resonance Audio Listener
Type: DSP unit
DSP: Resonance Audio Listener
Version: 65536
Channels: 0
Config dialog width/height: 0/0
Parameters:
name; type; desc; data
Gain; float (dB); [-80.0 to 0.0] Default = 0.0; min=-80, max=0, default=-1e-05
Room Properties; data (); ; datatype=user (default)That's all it can see. Its very unclear on what the parameters mean (0 is gain, 1 is room data), but I'd hazard a guess that 1 would be the struct that I defined a few posts back. And before you say that this program is lame, it only uses what FMOD gives it. If FMOD doesn't give it a bit of information, then it can't get it.

URL: https://forum.audiogames.net/post/427412/#p427412




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Update: OK, so I have this little program laying around that I wrote to get parameters for things like VSTs and DSPs. Its a bit out of date since it uses FMOD 1.10.11, I think, or something like it, but its close enough. Here's the information it gave on the Resonance Audio plugin:Plugin: Resonance Audio Listener
Type: DSP unit
DSP: Resonance Audio Listener
Version: 65536
Channels: 0
Config dialog width/height: 0/0
Parameters:
name; type; desc; data
Gain; float (dB); [-80.0 to 0.0] Default = 0.0; min=-80, max=0, default=-1e-05
Room Properties; data (); ; datatype=user (default)That's all it can see. Its very unclear on what the parameters mean (0 is gain, 1 is room data), but I'd hazard a guess that 1 would be the struct that I defined a few posts back.

URL: https://forum.audiogames.net/post/427412/#p427412




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@15, the listener and all of that is controlled via FMOD's functions. The DSP does not control or maintain the listener. I can't help you any more than I already have; I have not used the SDK or plugin. And you might want to look at https://resonance-audio.github.io/resonance-audio. Finally, I have no idea why the members of the struct or 3D atributes ar private. But, either way, you need to call FMOD::System::Set3DListenerAttributes() to set the listeners various attributes. A DSP does *not* control that. Again, please read the FMOD documentation, especially the tutorials and reference. They may cover C++ but they are just as valuable.

URL: https://forum.audiogames.net/post/427391/#p427391




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@Ethin what exactly I have to check in the documentation?The 3dAtributes that the documentation indicates aren't for the resonance audio plugin; If you set it with "set3dListenerAtributes" in the main system object and "set3DAtributes" in the DSP for the resonance source plugin they didn't work nothing.Also, if you check various forums posts, they says that these standar methods of fmod arne'aren't compatible yet with resonance audio.If you want use it, I have to pass the parameters to the plugin using the "setDspParameters" functions for each DSP... OK, perfect, but... what are these parameters? where are documented?So, inspecting more the source of the fmod plugin in the resonance audio source I found some things:https://github.com/resonance-audio/reso … od/fmod.cc1. the listenerDSP ahve two parameters. The gain, and one roomProperties. I suppose that the first you can pass to the dsp using the "SetpFloatParameter" function of a dsp object. And the second with some tricky using the setDataParameter function, passing a decoded in a byte array a roomPropertie struct.How to pass it directly from c++ to c#... well time to break my head.In the other hand, the source DSP have... well like 12 or 13 different parameters that you configure with a mixing of floats, booleans  and ints , but the the most interesting of it is the 6th parameter. 3dAtributes that receibes a FMOD_3D:atributes_Parameter.Well, first I can't find where that struct or class was defined, but going to the c++ and c# headers in the fmod packages i can find it.Well, apparently  this labyrinth is going to be more clear, but... If you see the struct in the c# headers... the struct is public, but all of the atributes are private, so you can't instantiate it...So... what is next?hack and modify the headers to get that you want isn't the idea; these parameters are private for a good reazon, so the correct way to do this must exist, but...Why we have to do this investigation? is a production plugin; this must be documented. The low level or core api isn't a extrange private api that we are using. I had saw this behavior in various fmods plugin. They have documentation for the fmod studio authoring tool, but nothing for the low level / core api.But well. And I'm asking to you @ethin because you said that you use fmod, and you get to this works with c++.@lightsomeOf course, I posted now all the discovers that I've done until today So, I must downgrade my fmod from 2.00.00 to 1.10.12 because aparently the resonance audio plugin isn't compatible yet with that version... Or at less in the current master branch of the resonance source I saw a reference to the lowLevel.h header, and that header was the old core api header in the version 1 of the fmod.And, when I tried to get DSPParametersInfo  of the plugin with the version 2, I got pure ununderstandable  symbols, but with the older version it works.So, we have to dig a few more in to this experiment to get it work.Thanks guys.edit:@nyanchan thanks for your tip!And yes, now my problem is ... how to instantiate a instance of that struct. I can't set any of the parameters because on the definition of the struct in c# the parameters all of them are setted as private. and you can't modify it, or get it. And of course, is a struct, so don't have a constructor.

URL: https://forum.audiogames.net/post/427382/#p427382




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@Ethin what exactly I have to check in the documentation?The 3dAtributes that the documentation indicates aren't for the resonance audio plugin; If you set it with "set3dListenerAtributes" in the main system object and "set3DAtributes" in the DSP for the resonance source plugin they didn't work nothing.Also, if you check various forums posts, they says that these standar methods of fmod arne'aren't compatible yet with resonance audio.If you want use it, I have to pass the parameters to the plugin using the "setDspParameters" functions for each DSP... OK, perfect, but... what are these parameters? where are documented?So, inspecting more the source of the fmod plugin in the resonance audio source I found some things:https://github.com/resonance-audio/reso … od/fmod.cc1. the listenerDSP ahve two parameters. The gain, and one roomProperties. I suppose that the first you can pass to the dsp using the "SetpFloatParameter" function of a dsp object. And the second with some tricky using the setDataParameter function, passing a decoded in a byte array a roomPropertie struct.How to pass it directly from c++ to c#... well time to break my head.In the other hand, the source DSP have... well like 12 or 13 different parameters that you configure with a mixing of floats, booleans  and ints , but the the most interesting of it is the 6th parameter. 3dAtributes that receibes a FMOD_3D:atributes_Parameter.Well, first I can't find where that struct or class was defined, but going to the c++ and c# headers in the fmod packages i can find it.Well, apparently  this labyrinth is going to be more clear, but... If you see the struct in the c# headers... the struct is public, but all of the atributes are private, so you can't instantiate it...So... what is next?hack and modify the headers to get that you want isn't the idea; these parameters are private for a good reazon, so the correct way to do this must exist, but...Why we have to do this investigation? is a production plugin; this must be documented. The low level or core api isn't a extrange private api that we are using. I had saw this behavior in various fmods plugin. They have documentation for the fmod studio authoring tool, but nothing for the low level / core api.But well. And I'm asking to you @ethin because you said that you use fmod, and you get to this works with c++.@lightsomeOf course, I posted now all the discovers that I've done until today So, I must downgrade my fmod from 2.00.00 to 1.10.12 because aparently the resonance audio plugin isn't compatible yet with that version... Or at less in the current master branch of the resonance source I saw a reference to the lowLevel.h header, and that header was the old core api header in the version 1 of the fmod.And, when I tried to get DSPParametersInfo  of the plugin with the version 2, I got pure ununderstandable  symbols, but with the older version it works.So, we have to dig a few more in to this experiment to get it work.Thanks guys.

URL: https://forum.audiogames.net/post/427382/#p427382




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : nyanchan via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

FMOD_DSP_PARAMETER_3DATTRIBUTES is what you need for that. It should be set using FMOD_DSP_SetParameterData.

URL: https://forum.audiogames.net/post/427377/#p427377




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-17 Thread AudioGames . net Forum — Developers room : lightsome via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@sanslash332: we should cooperate cause we are trying to solve the same problem. Please tell me if you find the solution. We should read the documentation of Fmod DSP thoroughly. And check that example below to see how they pass the structure to the plugin in c#. https://github.com/resonance-audio/reso … ceAudio.cs

URL: https://forum.audiogames.net/post/427312/#p427312




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-16 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@11, read the FMOD manual, that's all there.

URL: https://forum.audiogames.net/post/427269/#p427269




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-16 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Sure! But these are the struct for the room settings.where are the options and parameters for the listener and the source?And if you want create a room using that struct... You have apply it to what?The room is a  property of the listener? or what?I'm lost at that point 

URL: https://forum.audiogames.net/post/427268/#p427268




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-16 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

The struct is in fact documented. The struct is below:struct RoomProperties {
  // Constructs |RoomProperties| with the default values.
  RoomProperties()
  : position{0.0f, 0.0f, 0.0f},
rotation{0.0f, 0.0f, 0.0f, 1.0f},
dimensions{0.0f, 0.0f, 0.0f},
material_names{MaterialName::kTransparent, MaterialName::kTransparent,
   MaterialName::kTransparent, MaterialName::kTransparent,
   MaterialName::kTransparent, MaterialName::kTransparent},
reflection_scalar(1.0f),
reverb_gain(1.0f),
reverb_time(1.0f),
reverb_brightness(0.0f) {}

  // Center position of the room in world space, uses right-handed coordinate
  // system.
  float position[3];

  // Rotation (quaternion) of the room in world space, uses right-handed
  // coordinate system.
  float rotation[4];

  // Size of the shoebox room in world space, uses right-handed coordinate
  // system.
  float dimensions[3];

  // Material name of each surface of the shoebox room in this order:
  // [0] (-)ive x-axis wall (left)
  // [1] (+)ive x-axis wall (right)
  // [2] (-)ive y-axis wall (bottom)
  // [3] (+)ive y-axis wall (top)
  // [4] (-)ive z-axis wall (front)
  // [5] (+)ive z-axis wall (back)
  MaterialName material_names[6];

  // User defined uniform scaling factor for all reflection coefficients.
  float reflection_scalar;

  // User defined reverb tail gain multiplier.
  float reverb_gain;

  // Adjusts the reverberation time across all frequency bands. RT60 values
  // are multiplied by this factor. Has no effect when set to 1.0f.
  float reverb_time;

  // Controls the slope of a line from the lowest to the highest RT60 values
  // (increases high frequency RT60s when positive, decreases when negative).
  // Has no effect when set to 0.0f.
  float reverb_brightness;
};The material types enum looks like:enum MaterialName {
  kTransparent = 0,
  kAcousticCeilingTiles,
  kBrickBare,
  kBrickPainted,
  kConcreteBlockCoarse,
  kConcreteBlockPainted,
  kCurtainHeavy,
  kFiberGlassInsulation,
  kGlassThin,
  kGlassThick,
  kGrass,
  kLinoleumOnConcrete,
  kMarble,
  kMetal,
  kParquetOnConcrete,
  kPlasterRough,
  kPlasterSmooth,
  kPlywoodPanel,
  kPolishedConcreteOrTile,
  kSheetrock,
  kWaterOrIceSurface,
  kWoodCeiling,
  kWoodPanel,
  kUniform,
  kNumMaterialNames
};

URL: https://forum.audiogames.net/post/427265/#p427265




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-04-16 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Hello guys!Well, I'm trying to make a functional example using the official FMOD headers for c# (without supersonic) and monogame, plus resonance, and the majority of the things works fine, except resonanse audio.@Ethin do you can  make resonanse work in a c++ project using fmod?So, my problem is, that  I can create the DSP without problem and attach it to the corresponding channels, but the sounds didn't have the spatialiced effects.I asked on the FMOD forums, but they answers that the parameters for the resonanse audio, is necesary pass to the DSP using "setParameters" functions, and pass all of them as a struct...The problem is, the format of that struct isn't documented in any place. So, I have to dig in to the source code of resonance audio fmod plugin to try catch it, but no luck.Do you know something about this?Thanks

URL: https://forum.audiogames.net/post/427261/#p427261




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-03-19 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

I wouldn't call FMOD core's functionality 'basic'. More like 'professionally advanced', excluding the sound design part.To load a plugin in FMOD in C#, do the following (if memory serves, don't rely too heavily on the below code, I haven't written C# in ages):var result = System.loadPlugin("file.dll", out uint handle);if (res!=FMOD_Result.FMOD_OK) {// error occurred, handle is not valid}// create DSPresult = System.createDSPByPlugin(handle, out FMOD_DSP dsp);if (res!=FMOD_Result.FMOD_OK) {// error occurred, dsp is not valid}// use DSP...

URL: https://forum.audiogames.net/post/420422/#p420422




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-03-19 Thread AudioGames . net Forum — Developers room : lightsome via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

FMOD is divided into two parts: FMOD studio and FMOD core. FMOD core is an audio library with basic sound functionlaity and has to be accessed programmatically on a low level from c++ or other languages. FMOD studio is a proffesional sound design tool which allows automatized playback of large sound banks. And Resonance Audio is a plugin for FMOD. C# wrapper for FMOD core is provided with FMOD installation files.

URL: https://forum.audiogames.net/post/420399/#p420399




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-03-19 Thread AudioGames . net Forum — Developers room : nuno69 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

C# official audio plugin? What? Do you mean Fmod Ex or Fmod studio? Where said wrapper could be found?

URL: https://forum.audiogames.net/post/420357/#p420357




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-03-19 Thread AudioGames . net Forum — Developers room : lightsome via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

Thanks for your answer. But how do I load the Resonance Audio plugin? And how can I control specific sound properties of Resonance Audio? Could you please provide an example?

URL: https://forum.audiogames.net/post/420252/#p420252




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-03-18 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

@3, no problem. It is a brilliant library and I rave about it all the time because it clicks with me like no other audio library does.

URL: https://forum.audiogames.net/post/420217/#p420217




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-03-18 Thread AudioGames . net Forum — Developers room : sanslash332 via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

O, i love your answer I want to learn how to use fmod  specially in c#.That library works... Well something diferent than other more common libs  Thanks c forcreate this post xd.

URL: https://forum.audiogames.net/post/420206/#p420206




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: FMOD with Resonance Audio in Csharp

2019-03-18 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: FMOD with Resonance Audio in Csharp

For this, you need to use System::CreateDSP/System::CreateDSPByType, and set its properties with the out dsp object.

URL: https://forum.audiogames.net/post/420202/#p420202




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector