The Flocking Environment exposes a method called play() that is used to start the sample generation process. Based on verbal reports and posts on the mailing list, I think it's confusing for users, since it's easy for a newcomer to assume they need to call enviro.play() each time they want to trigger a sound. In reality, only one Environment instance should be created per application, and play() should be called only once at the beginning of the sound-generation process.
In order to address this issue, we should rename this method to start(), which is symmetrical with the Environment's existing stop() method, and matches the description of this function in all the documentation. The play() method should be deprecated and removed in Flocking 0.3.0.
In addition, multiple calls to enviro.play() will cause portions of the audio system to be reinstantiated unnecessarily. If the Environment is already playing, subsequent calls to play() should do nothing.
The Flocking Environment exposes a method called
play()
that is used to start the sample generation process. Based on verbal reports and posts on the mailing list, I think it's confusing for users, since it's easy for a newcomer to assume they need to callenviro.play()
each time they want to trigger a sound. In reality, only one Environment instance should be created per application, andplay()
should be called only once at the beginning of the sound-generation process.In order to address this issue, we should rename this method to
start()
, which is symmetrical with the Environment's existingstop()
method, and matches the description of this function in all the documentation. Theplay()
method should be deprecated and removed in Flocking 0.3.0.In addition, multiple calls to
enviro.play()
will cause portions of the audio system to be reinstantiated unnecessarily. If the Environment is already playing, subsequent calls toplay()
should do nothing.