#115648 - relpats_eht - Thu Jan 18, 2007 3:36 am
According to myself and everyone else's whom I have asked, this problem cannot possible exist, and yet, I'm posting.
What I really want to know here is how this is even possible. If you know a solution to the problem, you may feel free to tell me it, but what I am really asking is how this bug can possibly exist. I feel it is most easily explained through code.
ARM7:
If after the sound is loaded and played IPC->aux is printed out, it will equal 220, meaning that the variables equal what they should, both before and after they are used; however, the sample will not play correctly unless constants are used in place of them. I should also probably note that even while using constants so that the sample, rather than garbage, does play, it is a bit distorted.
If you would like further explanation or code before you can adequately tell me how this conundrum is possible, please, feel free to ask for it.
_________________
- relpats_eht
What I really want to know here is how this is even possible. If you know a solution to the problem, you may feel free to tell me it, but what I am really asking is how this bug can possibly exist. I feel it is most easily explained through code.
ARM7:
Code: |
IPC->aux = 0
if(snd->data[i].rate == 8000) IPC->aux += 10; SCHANNEL_TIMER(i) = SOUND_FREQ(snd->data[i].rate); // Does not work SCHANNEL_TIMER(i) = SOUND_FREQ(8000); // Does work if(snd->data[i].rate == 8000) IPC->aux += 10; if(snd->data[i].len == 54661) IPC->aux += 100; SCHANNEL_LENGTH(i) = snd->data[i].len; // Does not work SCHANNEL_LENGTH(i) = snd->data[i].len >> 4; // Does work, but only plays a portion of the sample SCHANNEL_LENGTH(i) = 13665; // Does work (54661 >> 2) if(snd->data[i].len == 54661) IPC->aux += 100; |
If after the sound is loaded and played IPC->aux is printed out, it will equal 220, meaning that the variables equal what they should, both before and after they are used; however, the sample will not play correctly unless constants are used in place of them. I should also probably note that even while using constants so that the sample, rather than garbage, does play, it is a bit distorted.
If you would like further explanation or code before you can adequately tell me how this conundrum is possible, please, feel free to ask for it.
_________________
- relpats_eht