// Copyright (C) 2005 Gideon May (gideon@computer.org) // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice appears in all copies, and a notice // that the code was modified is included with the copyright notice. // // This software is provided "as is" without express or implied warranty, // and with no claim as to its suitability for any purpose. // #include #include #include #include #include #include #include "held_ptr.hpp" using namespace boost::python; namespace { bool setSample(osgSound::SoundState& self, osgSound::Sample * sample) { return self.setSample(sample); } }; namespace PyOSGSound { void init_SoundState() { class_, bases > sound_state("SoundState", no_init); sound_state .def(init >(args("Sample", "playing"))) .def("setName", &osgSound::SoundState::setName) .def("getName", &osgSound::SoundState::getName) .def("hasSource", &osgSound::SoundState::hasSource) .def("setSample", &osgSound::SoundState::setSample) .def("setSample", &setSample) .def("getSample", &osgSound::SoundState::getSample, return_value_policy()) .def("valid", &osgSound::SoundState::valid) .def("setPositionVelocity", &osgSound::SoundState::setPositionVelocity) .def("setPosition", &osgSound::SoundState::setPosition) .def("setVelocity", &osgSound::SoundState::setVelocity) .def("setGain", &osgSound::SoundState::setGain) .def("setLooping", &osgSound::SoundState::setLooping) .def("setRelative", &osgSound::SoundState::setRelative) // .def("isActive", &osgSound::SoundState::isActive) .def("setMinMaxDistance", &osgSound::SoundState::setMinMaxDistance) .def("setMinDistance", &osgSound::SoundState::setMinDistance) .def("setMaxDistance", &osgSound::SoundState::setMaxDistance) .def("setPlay", &osgSound::SoundState::setPlay) .def("getPlay", &osgSound::SoundState::getPlay) ; } }