From the file adc_dac_playback.h:
#define REFERENCE_FREQ (3000u)#define SAMPLES_PER_PERIOD (SAMPLE_RATE) / (REFERENCE_FREQ)#define SAMPLE_SIZE (4u)
#define NUM_CHANNELS (4u)
/* Macro to set buffer size */#define AUDIO_BUFFER_SIZE (SAMPLES_PER_PERIOD * NUM_CHANNELS * SAMPLE_SIZE * 4u)
Why is the trailing 4u there?
The buffer size is used in a call to adi_adau1979_SubmitBuffer(). The documentation says the size is in bytes
Thanks, I moved your question over the SHARC space on the forum where they should be able to help you.
What processor are you using?
I am using the adsp-sc573
You may remove the 4u in the code, having which only increases the buffer size with no real need.
The buffer size can simply be,
#define AUDIO_BUFFER_SIZE (SAMPLES_PER_PERIOD * NUM_CHANNELS * SAMPLE_SIZE)