0
0

I use createsound to open my files like this:

[code:zn6l3eh6]
m_system->createSound(name.c_str(), FMOD_SOFTWARE|FMOD_CREATESTREAM, &extrainfo, &pSound);
[/code:zn6l3eh6]

After I opened a file like that I can’t rename/move/delete that file. I tried
[code:zn6l3eh6]Sound::release()
Channel::stop()[/code:zn6l3eh6]
but no success
and even after
[code:zn6l3eh6]System::close()
System::release()[/code:zn6l3eh6]
STILL no success. Only after I quit my application can I rename/move/delete the file.

So what am I missing?

  • You must to post comments
0
0

[quote:18mjogd1]After I opened a file like that I can’t rename/move/delete that file.[/quote:18mjogd1]
I cant reproduce this problem. When i load a sound without the FMOD_CREATESTREAM flag, i can go to explorer and rename the file while it is playing. When I load as a stream i cannot rename it while it is playing, but once i call sound->release() i can rename it even while program is still running.

Can you try reproduce this bug using the playstream example by replacing the main loop with the following:

[code:18mjogd1]
/*
Main loop.
*/
do
{
if (kbhit())
{
key = getch();

        switch (key)
        {
            case ' ' :
            {
                if(sound)
                {
                    ERRCHECK(result = sound->release());
                    sound = 0;
                }
            }
        }
    }

    system->update();
    Sleep(10);

} while (key != 27);

[/code:18mjogd1]

Now you should [i:18mjogd1]not[/i:18mjogd1] be able to rename ‘wave.mp3’ while it is playing, but once you press spacebar it should stop playing and then you should be able to rename/move it.

Hope this helps.

-Petroz

  • You must to post comments
0
0

Well, I did some more testing and I’ve found out that it’s my own plugins that is the culplrit.

I’ve made five input plugins, and everything works fine with three of them. With one, the file is still locked after a Sound::release() and with one it crashes when calling Sound::release(). I’m hopefully able to fix those two aswell.

Thanks for the help anyway!

  • You must to post comments
0
0

You’re welcome, good luck with your bug fixes.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.