0
0

Hi all !

I use fmodex for my shoutcast reader. I should like use a plugins for my program but i’m a problem with getOpenState.

I use C# language and a created a class from use fmod. With fmod without plugin, my program run correctly but if use plugins (i change fmodex.dll to fmodexp.dll and use fmodp.cs) i have a problem with getOpenState.

getOpenState return "OK" but my try of this return C# error (Exception) "reference of object is not define to a object hinstance". It’s strange because getOpenState return "OK" and if use fmod without plugin (fmodex.dll and fmod.cs) then my program run 😕

my code :
[code:amrb6zm3]
class lecteur
{
// Déclaration
private FMOD.System systeme = null;
public FMOD.Sound son = null;
public FMOD.Channel channel = null;
public FMOD.OPENSTATE statut_buffer = FMOD.OPENSTATE.BUFFERING;
public uint pourcentage_buffer = 0;
public bool pret = false;
private uint IpositionLecture = 0;
public FMOD.RESULT resultat;
private int index = 0;
private FMOD.PLUGINTYPE pluginType = FMOD.PLUGINTYPE.CODEC;

    // Constructeur / initialisation
    public lecteur(int channels, uint buffer)
    {
        // Initialisation de FMOD et préparation du buffer
        FMOD.Factory.System_Create(ref this.systeme);
        this.systeme.init(channels, FMOD.INITFLAG.NORMAL, (IntPtr)null);
        this.systeme.setStreamBufferSize(128 * buffer, FMOD.TIMEUNIT.RAWBYTES);
        this.systeme.loadPlugin("codec_s3m.dll", ref pluginType, ref index);
        this.systeme.setPluginPath("");
        this.systeme.loadPlugin("codec_oggvorbis.dll", ref pluginType, ref index);
        this.systeme.loadPlugin("codec_asf.dll", ref pluginType, ref index);
        this.systeme.loadPlugin("codec_mpeg.dll", ref pluginType, ref index);

    }

    // Charge le fichier / lien en mémoire
    public void charger_fichier(string fichier)
    {
        systeme.setOutputByPlugin(index);
        systeme.createStream(fichier, (FMOD.MODE.HARDWARE | FMOD.MODE._2D | FMOD.MODE.CREATESTREAM | FMOD.MODE.NONBLOCKING), ref this.son);
    }

    // Effectue la mise en cache du fichier distant
    public void mise_en_cache()
    {
        resultat = this.son.getOpenState(ref this.statut_buffer, ref this.pourcentage_buffer, ref this.pret);
        verification_erreur(resultat);
    }

    // Lance la lecture
    public void lecture()
    {
        systeme.playSound(FMOD.CHANNELINDEX.FREE, son, false, ref channel);
    }

...
[/code:amrb6zm3]
sorry for my english expression, i’m french 😳

  • You must to post comments
0
0

On add a lot of test, i can see that fmod return error in this line
[code:3cwqmb9c]this.systeme.init(channels, FMOD.INITFLAG.NORMAL, (IntPtr)null);[/code:3cwqmb9c]

error : ERR_PLUGIN_MISSING – a request output, dsp unit type or codec was not available.

  • You must to post comments
0
0

tu es francais poussinphp, moi aussi.
Moi j’ai un problème avec la fonction getopenstate.
Je n’arrive pas l’utiliser avec FMOD_OPENSTATE_READY
Je code avec VB6

  • You must to post comments
0
0

you need to put the dll in your directory for the file format you are trying to use. The plugin is missing. You are using the plugin version of fmod, with no plugins.

  • You must to post comments
0
0

Hello Brett, how to use the function getopenstate and fmod_openstateready in VB6?
I would like to use it with createsound.

I do not manage to use it?

  • You must to post comments
0
0

I have to use the documentation of fmod but I did not manage to put on getopenstate
Help me please !

  • You must to post comments
0
0

You have to ask a specific question, or say what the problem is, you have not done either.

  • You must to post comments
0
0

How to use the function getopenstate and fmod_openstateready in VB6?
I would like to use it with createsound.

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.