joaotragtenberg
Active member
I have fixed it hardcoding (hammering my head against the code)
in the play method of the AudioPlayMemory class I added a simple "length *= 2;" line
I don't know anything about pointers, and I didn't understand what I did, but I believe that if I add a generic line "length *= 128/AUDIO_BLOCK_SAMPLES;"
would that be it?
It worked for 64 samples and 32.
But not with 16 samples... It just gave an annoying 2781 Hz + harmonics beep...
but 32 is already good enough for me!
in the play method of the AudioPlayMemory class I added a simple "length *= 2;" line
Code:
void AudioPlayMemory::play(const unsigned int *data)
{
uint32_t format;
playing = 0;
prior = 0;
format = *data++;
next = data;
beginning = data;
length = format & 0xFFFFFF;
length *= 2;
playing = format >> 24;
}
I don't know anything about pointers, and I didn't understand what I did, but I believe that if I add a generic line "length *= 128/AUDIO_BLOCK_SAMPLES;"
would that be it?
It worked for 64 samples and 32.
But not with 16 samples... It just gave an annoying 2781 Hz + harmonics beep...
but 32 is already good enough for me!
Last edited: