Thread: Development: Cutscenes
View Single Post
Old August 10th, 2010 (7:30 AM).
Xenesis's Avatar
Xenesis Xenesis is offline
Syogun Changer
    Join Date: May 2006
    Location: Australia
    Nature: Sassy
    Posts: 55
    Originally Posted by knizz View Post
    Also the DMA alone can't be responsible for the music to continue.
    1) The DMA-Buffer only holds enough samples for maybe half a second.
    2) New samples have to be created from the notes in the same interval.

    Probably it's because of a timer... (what else does this timer trigger?)
    A subroutine (or nested subroutine) from the main loop at some level should call what is essentially the 'music engine'. You'll find that the game should (through every loop) update the buffer to include the audio data in a timely fashion.

    Regardless of anything else, whenever you run a script the main loop is still occurring at a fundamental level every frame that the game runs. If you want to control what audio is playing, the most direct method would be to send commands to the game's sound engine. (Which is basically what any music change commands in scripts, etc. would do anyhow)
    Reply With Quote