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;
}