From b9c9cfdbac66b38faacdff6b5b2629c332d328a9 Mon Sep 17 00:00:00 2001 From: Reinhard Panhuber Date: Sat, 29 Aug 2020 13:22:21 +0200 Subject: [PATCH] Change min to tu_min16. --- src/class/audio/audio_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class/audio/audio_device.c b/src/class/audio/audio_device.c index cbb13afc..3be10089 100644 --- a/src/class/audio/audio_device.c +++ b/src/class/audio/audio_device.c @@ -425,7 +425,7 @@ static bool audio_tx_done_type_I_pcm_ff_cb(uint8_t rhport, audiod_interface_t* a } // Limit to maximum sample number - THIS IS A POSSIBLE ERROR SOURCE IF TOO MANY SAMPLE WOULD NEED TO BE SENT BUT CAN NOT! - nSamplesPerChannelToSend = min(nSamplesPerChannelToSend, nEndpointSampleCapacity); + nSamplesPerChannelToSend = tu_min16(nSamplesPerChannelToSend, nEndpointSampleCapacity); nBytesToSend = nSamplesPerChannelToSend * CFG_TUD_AUDIO_N_CHANNELS_TX * CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_TX; // Encode