Audaspace:

Replacing AUD_Reference with boost::shared_ptr.
This commit is contained in:
2012-11-05 14:24:35 +00:00
parent 0f9559fe71
commit 5a8d5f77af
137 changed files with 1091 additions and 1040 deletions

View File

@@ -387,7 +387,7 @@ void BL_ConvertActuators(const char* maggiename,
{
bSound* sound = soundact->sound;
bool is3d = soundact->flag & ACT_SND_3D_SOUND ? true : false;
AUD_Reference<AUD_IFactory> snd_sound;
boost::shared_ptr<AUD_IFactory> snd_sound;
KX_3DSoundSettings settings;
settings.cone_inner_angle = soundact->sound3D.cone_inner_angle;
settings.cone_outer_angle = soundact->sound3D.cone_outer_angle;
@@ -406,21 +406,21 @@ void BL_ConvertActuators(const char* maggiename,
}
else
{
snd_sound = *reinterpret_cast<AUD_Reference<AUD_IFactory>*>(sound->playback_handle);
snd_sound = *reinterpret_cast<boost::shared_ptr<AUD_IFactory>*>(sound->playback_handle);
// if sound shall be 3D but isn't mono, we have to make it mono!
if (is3d)
{
try
{
AUD_Reference<AUD_IReader> reader = snd_sound->createReader();
boost::shared_ptr<AUD_IReader> reader = snd_sound->createReader();
if (reader->getSpecs().channels != AUD_CHANNELS_MONO)
{
AUD_DeviceSpecs specs;
specs.channels = AUD_CHANNELS_MONO;
specs.rate = AUD_RATE_INVALID;
specs.format = AUD_FORMAT_INVALID;
snd_sound = new AUD_ChannelMapperFactory(snd_sound, specs);
snd_sound = boost::shared_ptr<AUD_IFactory>(new AUD_ChannelMapperFactory(snd_sound, specs));
}
}
catch(AUD_Exception&)