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

Pages: [1]
1
Audio / Re: Fade-in volume problem
« on: January 23, 2013, 03:05:21 pm »
Quote
If your OpenAL implementation is OpenAL-soft, then you should ask its author directly.

I'm using the default OpenAL implementation on Mac (in /System/Library/Frameworks/OpenAL.framework).

For now I'll just use stereo files to work around this problem. Even though this isn't an SFML bug, I thought I would mention what I found here for future reference...

2
Audio / Re: Fade-in volume problem
« on: January 22, 2013, 10:32:35 pm »
UPDATE: I created a simple OpenAL example on OS X 10.8.2 (no SFML at all), and this fade-in problem is still present (again with mono sound files but not stereo files). So the problem is in OpenAL.

Even if I force the sound source to be at the listener's position, like this:
alSourcei(sourceID, AL_SOURCE_RELATIVE, AL_TRUE);
alSource3f(sourceID, AL_POSITION, 0.0f, 0.0f, 0.0f);
alSource3f(sourceID, AL_VELOCITY, 0.0f, 0.0f, 0.0f);
...the problem remains.

Does anyone know how to avoid this problem in OpenAL?

3
Audio / Re: Fade-in volume problem
« on: January 22, 2013, 05:16:52 pm »
I'm having the same problem: when I first play a sound, the first ~50ms fades in, but if I replay it before it has finished, there is no fade-in. If I wait for the sound to finish and replay it, the fade-in is present again. This is especially noticeable for sounds with a lot happening in the first 50ms... otherwise, I would not have noticed this problem.

I'm using SFML 2.0 on OS X.

Quote
I did some reading up on OpenAl, and since it's for 3d sounds mainly, it got me thinking that maybe it doesn't like mono. It doesn't, as it turned out! The sounds have to be stereo. Single channel doesn't cut it.

Hmm... that seems backwards to me. See the SFML sound spatialization tutorial: http://www.sfml-dev.org/tutorials/2.0/audio-spatialization.php. It says:

Quote
A sound can be spatialized only if it has a single channel, i.e. if it's a mono sound. Spatialization is disabled for sounds with more channels, since they already explicitely decide how to use the speakers. This is very important to keep in mind.

In any case, it appears that spatialization could be part of the sound fade-in problem, as eigen described. I too tried converting my sound files from mono to stereo, and that does seem to fix the problem (no more fade-in). I'm assuming this simply disables spatialized sound, just as the tutorial said.

I also tried disabling spatialized sound programmatically (still using mono sound files) by calling sound.setRelativeToListener(true), and leaving the default sound position at (0,0,0), which is described later in the same tutorial:

Quote
This can be useful for sounds emitted by the listener itself (like a gun shot, or foot steps). It also has the interesting side-effect of disabling spatialization if you set the position of the audio source to (0, 0, 0).

I was hoping that this alternate method of disabling sound spatialization would also remove the fade-in problem without having to modify my sound files. Unfortunately, it doesn't seem to fix the problem.

If anyone has any more info on this sound fade-in problem (like another way to disable sound spatialization programmatically), it would be appreciated.

4
Window / Re: IsKeyPressed Segfault
« on: January 22, 2013, 03:05:01 pm »
I just had the same problem. I'm using OS X with SFML 2.0. There are definitely no other versions of SFML on my machine (I have only installed one version). My app was running fine and then, with no changes to the code, it started crashing in sf::Keyboard::IsKeyPressed().

One possible clue: I'm using the Apple wireless keyboard, and my batteries are getting low. I received a low battery warning around the time that this problem started happening. So I turned off the keyboard and installed new batteries. The problem remained, so I logged out and back in, and the problem was fixed.

So I'm not sure what the problem was exactly (batteries or something else), but there seems to be something keyboard-related that is reset when logging out and back in.

Pages: [1]