0
0

Hello all!

I am trying to loop a sound forever. The file I load is a .midi file.
The sound plays once but doesn’t repeat.

[code:2maebjn4]
fmodSystem.createSound( fileName, FMOD.MODE.HARDWARE, ref sound );
[/code:2maebjn4]

And here how I set the looping:

[code:2maebjn4]
#region LoopForever

    /// <summary>
    /// Gets/Sets whether to loop this <see cref="Sound"/> forever.
    /// </summary>
    /// <remarks> If set to false the <see cref="Sound"/> will be played once. </remarks>
    /// <value> Default value is false. </value>
    public override bool LoopForever
    {
        get
        {
            MODE mode = 0;
            sound.getMode( ref mode );
            return ( mode & MODE.LOOP_OFF ) == 0;
        }
        set
        {
            if( value == true )
            {
                sound.setMode( MODE.LOOP_NORMAL );
                if( channel != null )
                    channel.setMode( MODE.LOOP_NORMAL );
            }
            else
            {
                sound.setMode( MODE.LOOP_OFF );
                if( channel != null )
                    channel.setMode( MODE.LOOP_OFF );
            }
        }
    }

    #endregion LoopForever

[/code:2maebjn4]

Thank you for your time and help,
Tanek

  • You must to post comments
0
0

Hi there!

Yes, I am using version “4.01.06”.
looping doesn’t work even if I specify looping in System::createSound

Thank you…

  • You must to post comments
0
0

There isn’t silence at the end of the MIDI, is there?

  • You must to post comments
0
0

I just tried a .mp3 file and it works.
I didn’t have any other .mid file before to try but I have one now.
It works! There must be something wrong with my other .mid file.

::edit::
[quote:14ysze0c]
There isn’t silence at the end of the MIDI, is there?
[/quote:14ysze0c]
You are so right… 3 minutes silence or so >.<

Thank you…

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.