I just tried disabling PCM audio in the start menu, so that the winner menu would be the first PCM playback and the winner menu plays without the "pop".
If the "pop" was present in the winner menu when that's the first PCM playback I would think the problem was some variable that wasn't initialised, but the "pop" only happens the first time the start menu is loaded and only when the buffer is BANK_RAM.
I also tried as a hack to call my reload_audio function within my load_audio function to simulate PCM being closed down, but still the "pop" is there.
Edit: I also tried writing a PCM init function to initialise all vars and registers I could think of and call it before I load the menu the first time, but it didn't help either.
Sanity failing...
Edit2: My code is now set up so the only difference is this:
Code: Select all
unsigned char sample_point[4096];
//#define sample_point BANK_RAM
changing from one line to the other is the only change for whether there's a "pop" or not.
And I've added "RAM_BANK = 1;" every place I can think of, but also I'm already using RAM_BANK 1 in my other menu code and it runs without any problems.