SSE2: Fix hopefully the last few alignment issues

--HG--
branch : sse2
hg/feature/sse2
kaetemi 11 years ago
parent 5ec363a8a9
commit d18159616e

@ -471,7 +471,7 @@ protected:
/// Returns nb available tracks (or NULL) /// Returns nb available tracks (or NULL)
void getFreeTracks( uint nb, CTrack **tracks ); void getFreeTracks( uint nb, CTrack **tracks );
/// Fill a vector of position and mute flag for all playing sound source. /// Fill a vector of position and mute flag for all playing sound source.
virtual void getPlayingSoundsPos(bool virtualPos, std::vector<std::pair<bool, NLMISC::CVector> > &pos); virtual void getPlayingSoundsPos(bool virtualPos, std::vector<CPlayingSoundPos> &pos);
typedef CHashMap<NLMISC::TStringId, CControledSources, NLMISC::CStringIdHashMapTraits> TUserVarControlsContainer; typedef CHashMap<NLMISC::TStringId, CControledSources, NLMISC::CStringIdHashMapTraits> TUserVarControlsContainer;
/// Container for all user controler and currently controled playing source /// Container for all user controler and currently controled playing source

@ -260,7 +260,7 @@ private:
/// The data of the sound. /// The data of the sound.
TSoundData &SoundData; TSoundData &SoundData;
/// The position of the source. /// The position of the source.
NLMISC::CVector Position; NLMISC::CVectorPacked Position;
/** The relative gain of the source. This is used for patatoid competition.when /** The relative gain of the source. This is used for patatoid competition.when
* a smaller patatoid mute bigger one. * a smaller patatoid mute bigger one.
*/ */

@ -336,7 +336,13 @@ public:
virtual uint getMutedPlayingSourcesCount() const = 0; virtual uint getMutedPlayingSourcesCount() const = 0;
/// Return a string showing the playing sources /// Return a string showing the playing sources
virtual std::string getSourcesStats() const = 0; virtual std::string getSourcesStats() const = 0;
virtual void getPlayingSoundsPos(bool virtualPos, std::vector<std::pair<bool, NLMISC::CVector> > &pos) =0; struct CPlayingSoundPos
{
CPlayingSoundPos(bool first_, const NLMISC::CVector &second_) : first(first_), second(second_) { }
bool first;
NLMISC::CVector second;
};
virtual void getPlayingSoundsPos(bool virtualPos, std::vector<CPlayingSoundPos> &pos) =0;
/** Write profiling information about the mixer to the output stream. /** Write profiling information about the mixer to the output stream.
* \param out The output stream to which to write the information * \param out The output stream to which to write the information
*/ */

@ -1475,7 +1475,7 @@ void CAudioMixerUser::freeTrack(CTrack *track)
// ****************************************************************** // ******************************************************************
void CAudioMixerUser::getPlayingSoundsPos(bool virtualPos, std::vector<std::pair<bool, NLMISC::CVector> > &pos) void CAudioMixerUser::getPlayingSoundsPos(bool virtualPos, std::vector<CPlayingSoundPos> &pos)
{ {
int nbplay = 0; int nbplay = 0;
int nbmute = 0; int nbmute = 0;
@ -1493,9 +1493,9 @@ void CAudioMixerUser::getPlayingSoundsPos(bool virtualPos, std::vector<std::pair
if (source->isPlaying()) if (source->isPlaying())
{ {
if (virtualPos) if (virtualPos)
pos.push_back(make_pair(source->getTrack() == 0, source->getVirtualPos())); pos.push_back(CPlayingSoundPos(source->getTrack() == 0, source->getVirtualPos()));
else else
pos.push_back(make_pair(source->getTrack() == 0, pos.push_back(CPlayingSoundPos(source->getTrack() == 0,
source->getSourceRelativeMode() source->getSourceRelativeMode()
? source->getPos() + _ListenPosition ? source->getPos() + _ListenPosition
: source->getPos())); : source->getPos()));
@ -1517,9 +1517,9 @@ void CAudioMixerUser::getPlayingSoundsPos(bool virtualPos, std::vector<std::pair
if (source->isPlaying()) if (source->isPlaying())
{ {
if (virtualPos) if (virtualPos)
pos.push_back(make_pair(source->getTrack() == 0, source->getVirtualPos())); pos.push_back(CPlayingSoundPos(source->getTrack() == 0, source->getVirtualPos()));
else else
pos.push_back(make_pair(source->getTrack() == 0, pos.push_back(CPlayingSoundPos(source->getTrack() == 0,
source->getSourceRelativeMode() source->getSourceRelativeMode()
? source->getPos() + _ListenPosition ? source->getPos() + _ListenPosition
: source->getPos())); : source->getPos()));

@ -363,10 +363,10 @@ void CSoundManager::drawSounds(float camHeight)
} }
// draw the sound source position // draw the sound source position
{ {
std::vector<std::pair<bool, CVector> > soundPos; std::vector<UAudioMixer::CPlayingSoundPos> soundPos;
_AudioMixer->getPlayingSoundsPos(true, soundPos); _AudioMixer->getPlayingSoundsPos(true, soundPos);
std::vector<std::pair<bool, CVector> >::iterator first(soundPos.begin()), last(soundPos.end()); std::vector<UAudioMixer::CPlayingSoundPos>::iterator first(soundPos.begin()), last(soundPos.end());
for (; first != last; ++first) for (; first != last; ++first)
{ {
NL3D::CDRU::drawLine(first->second + CVector(0.5f,0.5f,0), first->second + CVector(-0.5f,-0.5f,0), CRGBA(255,0,255,255), *idriver); NL3D::CDRU::drawLine(first->second + CVector(0.5f,0.5f,0), first->second + CVector(-0.5f,-0.5f,0), CRGBA(255,0,255,255), *idriver);

Loading…
Cancel
Save