what I’m trying to do is quite simple.
i’m making a command line version of a drum machine which works by taking a sample and asking the user to specify how many portions he wants the sample broken down into.
then for each of those portions, the user will input the start time of each portion.
the program will then “assign” each sound to a button on the keyboard and remain in an infinite loop. when the user presses one of the assigned buttons, he should expect to hear the sound portion corresponding to that button.
what would be better FSOUND_Sample or FSOUND_Stream?
- BruceLeroy asked 14 years ago
You can read the “record” example to know how fsound_sample_lock/unlock works.
FMOD can play multiple sounds simultaneously, you just have to init fmod with enough channels, FSOUND_PlaySound will return a channel handle so you don’t have to care about overlaped sounds.
Then, you can do whatever you want with this channel.
thanks for your advice. could you let me know how sample lock/unlock works?
i’ve read the documentation and it’d be very much appreciated if some one could break that stuff down to laymen’s terms 😀
also another requirement in my program is that sounds should be able to overlap. so if one sound is pressing and the user presses another key, the sound corresponding to that key should play whilst the older one is still playing. i’m guessing that all i need do is use seperate channels for each sound…right?
- BruceLeroy answered 14 years ago
Please login first to submit.