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

Pages: [1]
1
General / Re: Win XP compatibility ?
« on: October 24, 2016, 12:17:42 pm »
OK, I did a simple test: I compiled SFML with v140_xp toolset (static SFML libs), including the examples and I've sent one example .exe to the person running XP and it runs fine.

So I guess everything is OK on SFML side and the issue must be somewhere in my own dll (or in the game itself).

Thanks for the help !

2
General / Re: Win XP compatibility ?
« on: October 23, 2016, 11:21:44 am »
The libraries starting with "sfml" should be compiled/linked by you when building SFML. Are you the right ones are picked up after building (and installing)?
Yes, I've re-built SFML (both static and dynamic versions, into two separate build dirs) using the v140_xp toolset. The target install dir is the same for both static and dynamic versions, so in the end I have a single install dir with both static and dynamic versions of SFML libs. I've also built the examples and they work fine.

My own dll using SFML is using the SFML install dir I've created, I'm sure (easy to check: renaming the install dir, iIget a compile time error when including a SFML .h).

3
General / Re: Win XP compatibility ?
« on: October 22, 2016, 05:26:40 pm »
OK, I managed to compile SFML (went smoother than I expected).
But I still have the problem: the plugin .dlo is somehow ignored when the game runs on XP systems.

I'm linking the static libs (smfl-window-s.lib;sfml-system-s.lib;opengl32.lib;winmm.lib;gdi32.lib;XInput.lib): could this be a source of troubles ?

P.S.
I've made a simplified version of my plugin that does not use SFML and it works fine on XP (at least when compiled with toolset v140_xp), so it looks like the trouble appears when I want to use SFML.

4
General / Re: Win XP compatibility ?
« on: October 20, 2016, 11:39:41 am »
Thanks, I'll give it a try. But I suspect I'll run into difficulties and I'll end up telling the few XPers to upgrade to Vista or something :).

5
General / Win XP compatibility ?
« on: October 20, 2016, 09:30:47 am »
Hi all,
I've been using SFML for long time to build a dll that is used as a plugin by a game (http://www.gp-bikes.com/). I only use the joystick-related features. At the moment I'm using SFML 2.3.2 with Visual Studio 2015 (game is Windows only).

Recently I've got players using the game and the plugin on Windows XP (!!) telling me the plugin doesn't work (the game does, of course). I thought I nailed the problem down to the fact that I've moved to VS 2015 and here I was using the default toolset (v140) instead of the xp-friendly one (v140_xp). So I fixed that but the plugin still doesn't work for players on XP.

Question: I'm linking (statically) my dll to SFML pre-compiled libs. Could this be troublesome ? Should I recompile SFML myself (with the v140_xp toolset) ?

Thanks !

6
System / Re: Single or separate axis for Xbox controller
« on: June 25, 2015, 08:03:29 pm »
Given what I know of SFML's philosophy, I doubt there's any interest to provide an XInput back-end to support XBox controllers, which is understandable.  It's a Microsoft design blunder (there is some discussion of this on the wiki linked above).  But the single axis is an annoying limitation.
I surely +1 this.

On various games, the game does support xinput just because of that "single axis triggers mess".
Would be nice if SMFL had support for xinput.

MaX.

7
Audio / Re: Playing a sample with a volume envelope
« on: February 17, 2015, 12:47:01 pm »
Quote
Anyway, I would need to have my function (that sets the volume according to the envelope and the current position) called each time a sample is played. How can I do that ?
Do you really need to set it per sample? Who's going to hear the difference, compared to doing it like 60 times per second?
I don't know yet if per-sample is needed or if something coarser could work too. Most likely, per-sample is overshoot. However, doing it per "bunch-of-samples" (e.g at 60Hz) will limit how small a grain could be, there's a trade-off to be done somewhere.

Anyway, even if I do it per "bunch-of-samples", I still need to use the SoundStream + chunk approach, but that should be OK.

MaX.

8
Audio / Re: Playing a sample with a volume envelope
« on: February 17, 2015, 10:53:09 am »
Quote
How d I do I know exactly where in the wav file we currently are ?
sound.getPlayingPosition()
Is it documented (in 2.2) ? I don't find it in the doc. I have a sound.getPlayingOffset() but it returns a Time.

Anyway, I would need to have my function (that sets the volume according to the envelope and the current position) called each time a sample is played. How can I do that ?

Quote
Then I can probably cast away the const and apply my volume envelope to the samples. Dirty, but should work, right ?
Nop. The returned samples are just a copy of what's into the internal OpenAL buffer. Changing them will not update the OpenAL buffer. You must copy the samples, do your modifications, and put them back into a sound buffer with the loadFromSamples function. But this is pre-processing, and we have already discussed this option. Also, I have no idea what this has to do with sound streams ;)
Bummer for the copy thing :)

The soundStream could allow me to have my volume envelope applied in a more dynamic fashion, "on the fly": if I pre-process (without sound stream), when the volume envelope changes I have to pre-process again (not sure but depending on the wav size, this may take too long).

On the other hand, a SoundStream could take the raw samples (no envelope) and apply the envelope each time a chunck is requested. If the chunk is small enough, the user will be able to change the envelope while playing.

I'll give it a try (as soon as possible) and let you know.

Thanks a lot for your replies and congrats for SFML: I'm really liking it ! (I use its sound and joystick stuff in some Qt apps).

MaX.

9
Audio / Re: Playing a sample with a volume envelope
« on: February 17, 2015, 09:13:08 am »
Have you tried the naive approach, i.e. adjusting the volume with setVolume while the sound is playing?
That wouldn't work I think. How d I do I know exactly where in the wav file we currently are ?

But looking more carefully at the tutorial for SoundStream (http://www.sfml-dev.org/tutorials/2.2/audio-streams.php) I just realized that I can create a SoundBuffer an do a getSamples() to get a const pointer to the samples. Then I can probably cast away the const and apply my volume envelope to the samples. Dirty, but should work, right ?

To avoid the ugly cast, I could even create a custom SoundStream that takes its samples from a SoundBuffer, apply the volume envelope and return chunks of size equal to the whole .wav size. A bit involved (to simply avoid the cast) but should work too.

MaX.

10
Audio / Re: Playing a sample with a volume envelope
« on: February 17, 2015, 01:30:33 am »
Couldn't you simply pre-process the file to ensure this - make sure it's within the envelope?  Why would you need SFML's help to do this at runtime?
Or maybe I'm just not understanding your question..
Yeah, pre-processing is what I said above (handle myself the "slicing" and "volume envelope" and then use loadFromSamples).

I need SFML to play the samples and to change the pitch on the fly.

MaX.

11
Audio / Re: Playing a sample with a volume envelope
« on: February 16, 2015, 11:58:37 pm »
I'm curious: what do you need this for?
It's a very specific need. I have a .wav file I show graphically on a graph and I'd like to allow the user to select a part of it and loop-play the selected part only, in a particular manner.

First, a volume envelope is applied to the selection, typically as (numbers are just to give an idea):
  • between 0% and 25% of the selection, the volume goes linearly form 0 to 1
  • between 25% and 75% of the selection, the volume stays at 1
  • between 75% and 100% of the selection, the volume goes linearly form 1 to 0
Also, when on the "fade out" section (volume going from 1 to 0), I'll be "mixing" that with the "fade in" section (volume going from 0 to 1).

Essentially what this is trying to achieve is to allow the user to select a section of the .wav and loop it smoothly.

I guess that one way to do that would be to handle myself the "slicing" and "volume envelope" and then use loadFromSamples.

MaX.

12
Audio / Playing a sample with a volume envelope
« on: February 16, 2015, 09:05:50 pm »
Hi all,
I'm new to SFML hence my question could be a bit noobish.

I'd like to play a given sound  (raw .wav) with a specified "volume envelope", meaning that each individual sample in the .wav must be played with a specified volume.

Is thee a way to achieve this with SFML ?

MaX.

Pages: [1]