plumb URDF/SDF audio_source into PhysicsServerCommandProcessor, allow to play sounds on collision !
See also https://youtu.be/eppOjTfx5Jg for a first test, and this modified URDF how to add sounds: https://github.com/bulletphysics/bullet3/blob/master/data/plane_with_collision_audio.urdf Add the --audio flag to enable sound in pybullet/Bullet-C-API
This commit is contained in:
@@ -183,7 +183,7 @@ bool b3SoundSource::isAvailable() const
|
||||
return m_data->m_envelope.isIdle();
|
||||
}
|
||||
|
||||
void b3SoundSource::startSound()
|
||||
void b3SoundSource::startSound(bool autoKeyOff)
|
||||
{
|
||||
if (m_data->m_envelope.isIdle())
|
||||
{
|
||||
@@ -209,7 +209,7 @@ void b3SoundSource::startSound()
|
||||
}
|
||||
}
|
||||
}
|
||||
m_data->m_envelope.keyOn();
|
||||
m_data->m_envelope.keyOn(autoKeyOff);
|
||||
}
|
||||
|
||||
void b3SoundSource::stopSound()
|
||||
|
||||
Reference in New Issue
Block a user