include/nuttx/audio/audio.h: Change member samp of apb to pointer so driver can customize sample buffer allocation
This commit is contained in:
parent
7d734b52bd
commit
4d115e925f
@ -377,7 +377,7 @@ begin_packed_struct struct ap_buffer_s
|
||||
sem_t sem; /* Reference locking semaphore */
|
||||
uint16_t flags; /* Buffer flags */
|
||||
uint16_t crefs; /* Number of reference counts */
|
||||
uint8_t samp[0]; /* Offset of the first sample */
|
||||
FAR uint8_t *samp; /* Offset of the first sample */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Structure defining the messages passed to a listening audio thread
|
||||
|
@ -130,6 +130,7 @@ int apb_alloc(FAR struct audio_buf_desc_s *bufdesc)
|
||||
apb->nmaxbytes = bufdesc->numbytes;
|
||||
apb->nbytes = 0;
|
||||
apb->flags = 0;
|
||||
apb->samp = (FAR uint8_t *)(apb + 1);
|
||||
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||
apb->session = bufdesc->session;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user