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

Pages: [1]
1
I can't find this information anywhere.  Probably there was a shader compile error, but how do I see it if that was the case?

2
Audio / Re: Can I disable/reenable SFML audio?
« on: September 22, 2016, 09:16:53 pm »
Here is some info that might hopefully help somebody in the future.

I found that I couldn't use anything in the sfml-audio.dll at all, I suppose because SFML's audio thread must have been interfering with my own WASAPI audio thread, which of course needs to run very fast at very high priority.  What was happening is that my audio was glitching semi-frequently.

I fixed this by removing sfml-audio.dll and anything that was using it.

So, that means I couldn't use sf::SoundBuffer for the purpose of loading audio files, but that functionality is easy to find elsewhere.

3
Audio / Re: Can I disable/reenable SFML audio?
« on: September 20, 2016, 05:30:18 am »
I managed to make a test and WASAPI audio does seem to work with SFML.  I don't think I need to disable anything.  Cheers.

4
Audio / Re: Can I disable/reenable SFML audio?
« on: September 19, 2016, 11:58:34 pm »
Oh, I think this answers my question about using my own renderer: http://www.sfml-dev.org/tutorials/2.4/audio-streams.php

But I'm still not sure if I can disable and re-enable SFML's audio.

5
General discussions / Re: A question about rendering in a separate thread
« on: September 19, 2016, 11:54:32 pm »
So you found the tutorial, which demonstrates a piece of code that does exactly what you want. So... why do you ask? ;)

Sorry, I would delete it if I could.

I'm just being paranoid.  I did a simple test and it works as advertised.

6
Audio / Can I disable/reenable SFML audio?
« on: September 19, 2016, 11:52:35 pm »
I have my own audio code using WASAPI for low latency audio, which is a necessity for my program.

Before I get too far into converting my project to SFML, I want to be sure that this isn't going to be a conflict.

I don't see any requirement to "enable" audio support, so it seems like audio is always enabled in SFML?

Also, can I point SFML at my own audio rendering function?  I want users to choose whether to use the WASAPI exclusive audio mode, or shared audio, in case the exclusive audio does not work for them for some reason. All of my audio is generated real-time by a renderer function.  For shared audio mode, I would like SFML to call my audio renderer function, rather than dealing with sf::Sound or sf::Music objects.

7
General discussions / Re: A question about rendering in a separate thread
« on: September 19, 2016, 09:37:45 pm »
Well, this question seems dumb in retrospect.  I can easily make a small test program to find out.

8
General discussions / A question about rendering in a separate thread
« on: September 19, 2016, 08:55:20 pm »
I have a question before I spend time converting a large program from SDL to SFML.

I read this document:

http://www.sfml-dev.org/tutorials/2.0/graphics-draw.php#drawing-from-threads

I need to process input in a "main" game loop.  I need very low latency on handling input events (<1ms).  If I am processing input in a render thread that is using vsync, then I'm only updating every 16ms, and that is 16 times too slow.

So, can somebody please tell me for certain if I can render graphics to a window in one thread, and handle input (keyboard presses etc) in another thread?

Pages: [1]
anything