[Openal] Mono sounds don't work well.
Daniel PEACOCK
dpeacock at creativelabs.com
Tue Mar 6 10:20:31 PST 2007
Hi Paul,
Which OpenAL device are you opening, and what soundcard do you have
installed (and does it have up-to-date drivers) ? Does the problem occur
on different AL devices and / or different soundcards ?
Do you have a small test application that shows the problem that you can
send me ... or ... can you reproduce the problem using the EFX10Show
application included in the Windows OpenAL SDK ?
Thanks,
Dan
Notice
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
"Paul Minasian"
<p_minasian at hotma
il.com> To
Sent by: openal at opensource.creative.com
openal-bounces at op cc
ensource.creative
.com Subject
[Openal] Mono sounds don't work
well.
03/05/2007 12:52
PM
Hallo,
I am using OpenAl version 1.1 under Windows.
I am using mono sounds.
The problem is as following: I hear the sounds too softly and
if the position of the source or listener doesn't change then
I hear the sound once in a while. The listener is attached to a
game character and the sound source is attached to another
character which is standing motionless. When the player who has the
listener moves away from the other character the volume of
the sound doesn't decrease.
The sound is played everytime the spacebar is pushed.
Minimumdistance is 10 and the maximum distance is 100.
I make use of AL_LINEAR_DISTANCE_CLAMPED.
I also used AL_INVERSE_DISTANCE_CLAMPED. I set the following
properties for the source: position, max distance, min distance,
rolloff, velocity, volume and pitch. The last ones are 1.0.
I set the following properties for the listener: position and orientation.
10 times per second the position and velocity of the source is updated
using
proper openal functions. 10 times per second the position and orientation
of
listener is
updated using proper openal functions.
The strange thing is that when I move the player character, hence listener,
just a little and keep moving or rotating I can hear the sound when I push
the spacebar. Otherwise I hear it once in a while. The same sound in stereo
is heard louder then the mono sound. Source stands near the minimum
distance
of listener and also in the range of minimum distance.
When source is in the range of the minimum distance does it mean that the
sound will be heard as loud as maximum allowed volume?
I use the following functions, one is for calculating the rolloff and the
other one is for calculating maximum distance:
TScalar TOpenALVorbisApi::calculateRollOff(TScalar minimumDistance, TScalar
maximumDistance, TScalar minVolume) const
{
TScalar rollOff = 0.0f;
if (m_DistModel == AL_INVERSE_DISTANCE_CLAMPED)
{
rollOff = (minimumDistance * (1-minVolume)) /
(minVolume *
(maximumDistance - minimumDistance));
}
else if (m_DistModel == AL_LINEAR_DISTANCE_CLAMPED)
{
rollOff = 1 /(maximumDistance - minimumDistance);
}
return rollOff;
}
TScalar TOpenALVorbisApi::calculateMaxDistance(TScalar minimumDistance,
TScalar rollOff, TScalar minVolume) const
{
TScalar maximumDistance = 0.0f;
if (m_DistModel == AL_INVERSE_DISTANCE_CLAMPED)
{
maximumDistance =
(minimumDistance*(minVolume*(rollOff -
1)+1))/(minVolume*rollOff);
}
else if (m_DistModel == AL_LINEAR_DISTANCE_CLAMPED)
{
maximumDistance = 1/rollOff + minimumDistance;
}
return maximumDistance;
}
I am stuck now and don't know how to handle the mentioned problems which
are:
1. Mono sounds are heard too softly.
2. Mono sounds are rarely heard when the position of listener and source
stays the same.
3. The volume of mono sounds doesn't decrease when using
AL_LINEAR_DISTANCE_CLAMPED and moving listener and source out each other.
I hope the problem I have is clear and hope that someone can help me with
this.
Best Regards,
Paul
_________________________________________________________________
Meer ruimte nodig? Maak nu je eigen Space http://spaces.msn.nl/
_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal
ForwardSourceID:NT0003D89E
More information about the Openal
mailing list