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 - devlin

Pages: 1 ... 7 8 [9]
121
Window / sf::ContextSettings, opengl version hint
« on: January 29, 2011, 08:58:38 pm »
I don't know if GetSettings calls this internally - but:
Code: [Select]
glGetString(GL_VERSION);
might give you another answer.

122
Audio / Audio causes hang within FreeLibrary.
« on: January 29, 2011, 08:12:25 pm »
Greetings!

I'm having problems with Audio when playing sound via a DLL plugin.

Basically, my current project loads game views from DLLs as a plugin system. If I load and play any sound/music from within that DLL - the application will hang upon FreeLibrary of that DLL and the music will stutter (no doubt due to the hang/deadlock).

I can get rid of the stutter by sleeping a few milliseconds after the Music.Stop() - before I unload the plugin via FreeLibrary. However, the application will still hang upon FreeLibrary.

I've tried to not allocate anything regarding music from within the DLL itself (rather letting the main-process load and play stuff) but that does not help. FreeLibrary seem to run in a recursive loop upon calling FreeLibrary.

Pseudocode (as a minimal example would involve 2 different projects etc - can provide if needed):

DLL:
Code: [Select]
plugin::init()
{
  sf::Music myMusic;
  myMusic.LoadFromFile("snd.ogg");  // if I comment out this and the line below - FreeLibrary doesn't hang.
  myMusic.Play();
}

plugin::deinit()
{
  myMusic.Stop();                   // seems to call a wait internally? But if I don't add a Sleep here, the sound will stutter when I try to unload the plugin.
}


Main program:
Code: [Select]
Plugin p = LoadPlugin("name.dll"); // creates a view internally
game.AddView(p);                   // adds the view to the game, calls init on plugin
game.MainLoop();                   // calls deinit on the plugin when done, does not unload the plugin but deletes the internal view.
p.Unload();                        // tries to unload the plugin via freelibrary - hangs upon the call to FreeLibrary.


Any idea whatsoever what might cause this? Is there anything allocated internally

123
Audio / SoundStream Latency
« on: January 14, 2011, 09:17:25 am »
std::thread from c++0x is another option if your compiler(s) supports it. (not sure if GCC on MacOS is high enough version yet)

124
General / Program crashes when getting buffer for audio file
« on: January 14, 2011, 09:12:19 am »
Just a wild stab in the dark, but have you created your AudioDAT and/or AudioDAT.data object properly?

125
System / sfml on 64bit archetecture
« on: January 12, 2011, 07:33:04 pm »
Quote from: "Laurent"
Quote
I have all the files required at home (at work now) if that would be of any help. It would be nice if they were included by default into the subversion repo however

This is exactly what I wanted to do. Please send me all this stuff and I'll be glad to add it to the repo ;)

PM sent.

126
System / sfml on 64bit archetecture
« on: January 12, 2011, 12:38:51 pm »
It does work as 64-bit library on a 64-bit architecture - however, getting it to work isn't all that easy. (word of warning though: the resulting executable will not start on a 32-bit architecture - unlike using a 32-bit library on a 64-bit architecture).

Basically you'll have to compile it for 64-bit (with for instance Visual Studio's 64-bit command prompt so that CMake adds the /machine:x64 to the appropriate compilers/linkers).

However, this isn't enough - the extlib stuff like jpeg, glew etc provided in the subversion repo are 32-bit only. There's another thread on this forum with appropriate ones for 64-bit compilation, you have to move the old 32-bit ones away and add the 64-bit ones in place to get those to work.

After that, what remains is libsndfile-1.dll, the one provided in the subversion repo is 32-bit only, but you can download the 64-bit one from their website.

I have all the files required at home (at work now) if that would be of any help. It would be nice if they were included by default into the subversion repo however.

i.e:

extlib/msvc/x64

so that linking to the proper libs when compiling sfml is as easy as changing the library path.

127
Audio / SFML and 8/16-Bit Music?
« on: January 10, 2011, 06:35:35 pm »
@OP: You could always integrate XM tracker support on your own by using Mini-FMod 1.7: (full source included)

http://www.fmod.org/files/minifmod170.zip

128
General discussions / SFML 2.0
« on: January 10, 2011, 04:00:01 pm »
Quote from: "Laurent"
Quote
Though the idea that we have a OpenGL object oriented interface would be really really nice. Though I would understand if it would be too much to implement.

Honestly, if I was starting SFML now I would do that. Too bad I didn't have this idea before.

As long as it's optional to use it.

Having to refactor rather large existing codebases to work with "OO"-wrappers like Tao/OpenTK to get them to work under C# was a major pain in the baguette. I would rather not have to do again in order to get them to work with future versions of SFML. (which btw is looking very neat) :)

Pages: 1 ... 7 8 [9]