Simple program - when button is pressed, play one short in memory (wav2sketch'd) sound file, then go back to diddling the NeoPixels.
I know the AdaFruit NeoPixel library disables interrupts on show() but I cant use the PJRC library 'cause it doesnt support RGBW strips. My audio playOneSound() should be a blocking call that will play the sound to completion and then go back to diddling leds
However, it doesnt seem to work consistently. Sometimes it does, other times not.
Do I need to put a mixer in there? with only one source and one sink, i dont see reason for one.
I'm digging thru code but thought I'd drop this here for the community input.
Mahalo!
I know the AdaFruit NeoPixel library disables interrupts on show() but I cant use the PJRC library 'cause it doesnt support RGBW strips. My audio playOneSound() should be a blocking call that will play the sound to completion and then go back to diddling leds
extern const unsigned int AudioSampleBell[16417];
AudioPlayMemory playMemSound;
AudioOutputAnalog dac; // output thru DAC pin 14
AudioConnection audioPatch(playMemSound, 0, dac, 0);
void playOneSound()
{
delay(50);
playMemSound.play(AudioSampleBell);
while (playMemSound.isPlaying())
delay(50);
}
However, it doesnt seem to work consistently. Sometimes it does, other times not.
Do I need to put a mixer in there? with only one source and one sink, i dont see reason for one.
I'm digging thru code but thought I'd drop this here for the community input.
Mahalo!