rootgordon
New member
Hello everyone,
I've been digging into the Audio-Library to create my own object to use with a teensy3.2 + Audio-Shield.
Naturally I'm running into problems, so I've gotten to the point where I've reduced my update function to the bare minimum:
AudioEffectDummy.cpp:
AudioEffectDummy.h:
as a test-setup i'm running audio from my pc into line-in left, which should be played back on line-out left:
There's absolute silence on the output. As far as I can tell the teensy freezes (as there's no output at all on the serial console if I insert some Serial.prints. there's nothing wrong with the sketch since it's running fine if I exclude the audio-connections).
The shield works fine and is playing audio from example-projects.
I feel like there's a fundamental misunderstanding on my part on how the audio-library works.
I've been digging into the Audio-Library to create my own object to use with a teensy3.2 + Audio-Shield.
Naturally I'm running into problems, so I've gotten to the point where I've reduced my update function to the bare minimum:
AudioEffectDummy.cpp:
Code:
#include "AudioStream.h"
#include "AudioEffectDummy.h"
#include "spi_interrupt.h"
void AudioEffectDummy::update(void) {
audio_block_t *inBlock ;
inBlock = receiveReadOnly() ;
transmit(inBlock, 0) ;
release(inBlock) ;
}
AudioEffectDummy.h:
Code:
#include "AudioStream.h"
class AudioEffectDummy : public Audiostream{
public:
AudioEffectDummy() : AudioStream(3, inputQueueArray) ;
virtual void update (void) ;
private:
audio_block_t *inputQueueArray[3] ;
}
Code:
#include <Audio.h>
#include <wire.h>
#include <SPI.h>
#include <AudioEffectDummy.h>
AudioInputI2S linein ;
AudioOutputI2S lineout ;
AudioEffectDummy dummy ;
AudioConnection patchCord1(linein, 0, dummy, 0) ;
AudioConnection patchCord2(dummy, 0, lineout, 0) ;
AudioControlSGTL5000 audioShield ;
...
There's absolute silence on the output. As far as I can tell the teensy freezes (as there's no output at all on the serial console if I insert some Serial.prints. there's nothing wrong with the sketch since it's running fine if I exclude the audio-connections).
The shield works fine and is playing audio from example-projects.
I feel like there's a fundamental misunderstanding on my part on how the audio-library works.