AnsweredAssumed Answered

Can someone explain AUDIO_BUFFER_SIZE from example?

Question asked by Mårten on Jan 27, 2018
Latest reply on Feb 19, 2018 by Jithul_Janardhanan

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

Outcomes