|
How to determine when a Midi audio player has finished playing |
|
|
This Java tip illustrates a method of determining When a Midi audio player has finished
playing. Developer may use this in gaming applications where there is a need for
playing different audios. Further this may also be used in your own media player. Here
in this tip a sequencer fires a meta message event when a midi file has finished playing.
// Add a listener for meta message events
sequencer.addMetaEventListener(
new MetaEventListener() {
public void meta(MetaMessage event) {
if (event.getType() == 47) {
// Sequencer is done playing
}
}
});
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.