Playback for the custom component

Hi,
I have a custom component. I create 8 objects of it.
The idea that each of 8 objects has its own sample to play after onclick event.

So, what is the best way to implement this playback method and init this controls (pass sample path to the constructor or maybe something else)?

Thank you

You should keep GUI and audio code as separated as possible. First figure out how you are going to do just the audio playback in the audio code, then figure out how to make a suitable GUI component for it.

1 Like