Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mike__

Pages: [1]
1
Audio / Re: sf::Listener. The app doesn't respond.
« on: July 12, 2014, 12:15:44 pm »
Ok, I understood.
Thanks for your help.

2
Audio / Re: sf::Listener. The app doesn't respond.
« on: July 12, 2014, 11:23:46 am »
Is that means I have to compile SFML dependents as static lib too?

Can you give me an example or short manual on it?

3
Audio / Re: sf::Listener. The app doesn't respond.
« on: July 12, 2014, 10:27:07 am »
I use it.

SFML alContext:
WIN32;_WINDOWS;NDEBUG;SFML_STATIC;_CRT_SECURE_NO_DEPRECATE;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)

plugin:
SFML_STATIC;WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN2_EXPORTS;QT_THREAD_SUPPORT;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)

upd:
I can't use sfml-audio-s.lib in alContext branch compilation, but v2.1 works for me.

4
Audio / Re: sf::Listener. The app doesn't respond.
« on: July 12, 2014, 09:56:17 am »
This is wrong, you should call "delete globalDevice", not just the destructor (otherwise the memory is never deallocated).
I missed it. Thanks.


If I use sfml-system-s.lib and sfml-audio-s.lib from this branch then I got while plugin compiling:
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alSourcePause"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alGetSourcef"
1>sfml-audio-s.lib(SoundSource.obj) : error LNK2001: unresolved external symbol "__imp__alGetSourcef"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alSourceQueueBuffers"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alBufferData"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alSourceUnqueueBuffers"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alGetSourcei"
1>sfml-audio-s.lib(SoundSource.obj) : error LNK2001: unresolved external symbol "__imp__alGetSourcei"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alSourcePlay"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alDeleteBuffers"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alSourcei"
1>sfml-audio-s.lib(SoundSource.obj) : error LNK2001: unresolved external symbol "__imp__alSourcei"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alSourceStop"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alGetBufferi"
1>sfml-audio-s.lib(SoundStream.obj) : error LNK2001: unresolved external symbol "__imp__alGenBuffers"
1>sfml-audio-s.lib(SoundSource.obj) : error LNK2001: unresolved external symbol "__imp__alGenSources"
1>sfml-audio-s.lib(SoundSource.obj) : error LNK2001: unresolved external symbol "__imp__alDeleteSources"
1>sfml-audio-s.lib(SoundSource.obj) : error LNK2001: unresolved external symbol "__imp__alSourcef"
1>sfml-audio-s.lib(SoundSource.obj) : error LNK2001: unresolved external symbol "__imp__alSource3f"
1>sfml-audio-s.lib(SoundSource.obj) : error LNK2001: unresolved external symbol "__imp__alGetSource3f"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alcCloseDevice"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alcDestroyContext"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alcMakeContextCurrent"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alListenerf"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alListener3f"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alListenerfv"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alcCreateContext"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alcOpenDevice"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alGetEnumValue"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alIsExtensionPresent"
1>sfml-audio-s.lib(AudioDevice.obj) : error LNK2001: unresolved external symbol "__imp__alcIsExtensionPresent"


5
Audio / Re: sf::Listener. The app doesn't respond.
« on: July 12, 2014, 08:56:34 am »
I couldn't use this branch cause I got incorrect static (*-s.lib) files (there was linking error while compiling plugin).
But I've solved my problem this way(SFML 2.1 sources fast fix):

AudioDevice* globalDevice = NULL;
void ensureALInit()
{
        if(globalDevice == NULL){
                globalDevice = new AudioDevice();
        }
}

void aLEnd()
{
                globalDevice->~AudioDevice();
                globalDevice = NULL;
}

I call aLEnd function manually before plugin unloading. In this case I can reload plugin properly.

6
Audio / Re: sf::Listener. The app doesn't respond.
« on: July 11, 2014, 01:15:41 pm »
The plugin based on callback functions and I can't avoid global objects at all.

But the problem is if I use sf::Listener then teamspeak can't unload plugin.

in other words:
If I will write only one SFML row:
sf::Listener::setPosition(5.f, 0.f, 5.f);
Then teamspeak will not be able to unload plugin with this row. If I will delete this row then all will works fine.

7
Audio / sf::Listener. The app doesn't respond.
« on: July 11, 2014, 11:01:31 am »
Hello. I use SFML 2.1 inside teamspeak plugin.
I used sf::Sound object like in tutorials.
sf::Sound sound;
The plugin could not be initialised. The application didn't respond.
Ok, I've solved it:
sf::Sound* sound;
...

int ts3plugin_init() {
    sound = new sf::Sound();
    ...
}
After this the application can initialize the plugin successfully and it works properly. (SFML is a very good thing).

But.
If i use sf::Listener in any place of my plugin then teamspeak cannot unload this plugin. It doesn't respond.
If I remove all sf::Listener call then teamspeak can unload plugin properly.
I can't use pointer on sf::Listener object because it has static methods only.
Can you help me?

Upd:
I suppose it happens because:
void ensureALInit()
{
    // The audio device is instantiated on demand rather than at global startup,
    // which solves a lot of weird crashes and errors.
    // It is destroyed at global exit which is fine.

    static AudioDevice globalDevice;
}
 

Pages: [1]