Parallel programming ?

I am trying to run some music while executing a program at the same time, basically having the music running over the top of the program.


Can anyone help me out with how to do this ?


Comments

  • : I am trying to run some music while executing a program at the same time, basically having the music running over the top of the program.


    : Can anyone help me out with how to do this ?





  • Should have mentioned that to begin with i guess ! I'm programing in C++...


  • : I am trying to run some music while executing a program at the same time, basically having the music running over the top of the program.


    Classically, you would use interrupts.


    If your code to play music plays each note it should be just a matter of looking at the manuals to see how you can generate fast enough interrupts.


    But if you use a self-contained library with code like:


    play(music);


    unless it has an option to run in the background, you could put the music in a separate thread.


    Thomas Kay


  • Any chance you know where i can get some sample

    code to work with ?. Up to now i have written the

    music note by note but i am also trying to include

    wav or midi files as well.


  • Get the allegro library. You can play midi files

    using this library, easy :)




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories