Stopping and starting music crashes

What is Arkos Tracker? Forums Arkos Tracker forum General discussion Stopping and starting music crashes

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #30049
    cpcitor
    Participant

    Hello,

    Context

    I’m using AKM in a firmware-drive event (frame flyback event).
    I get the minimal player AKM to play some music. So far so good.

    But I don’t want the music at all times. I need to stop it at times, play another, stop again, and so on.

    What works so far

    The firmware event looks fine. Everything works if it plays no music but just increase the value of first byte of screen. I can stop and start it at will, no crash. I also have it change border color and see the expected change. So, event handling on firmware seems fine. Also, I read SOFT968, especially sections 10 11 12 and appendix 10 just in case.

    When integrating the music player I surrounded it in logic to save alternate register set, inspired by http://www.julien-nevo.com/arkostracker/index.php/basic-cpc-integration/

    If I stop the event, I also have to call _PLY_AKM_STOP to silence the sound chip. So far so good.

    When it starts to fail

    If I call _PLY_AKM_INIT again and start the loop, I don’t get the music again. Some sounds, but they do not match the expected music patterns. As if the engine was trying to play music reading some random memory area.

    Do that in a loop and after 2-3 times the machine crashes.

    Question

    Q1: Do all variants of the player support being INIT again, on the same data or different data?

    Q2 : As stated in http://www.julien-nevo.com/arkostracker/index.php/basic-cpc-integration/ “Finally, it is possible to use interruptions in Basic to play the music while doing something else. If you need such facilities, please let me know and I’ll create another example.” Perhaps it would be best. Thanks!

    I can post my code if useful.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.