Merge pull request #318 from xross/develop

Reinstate check for current samplerate before changing
This commit is contained in:
Ross Owen
2023-03-09 16:42:26 +00:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2017-2022 XMOS LIMITED. // Copyright 2017-2023 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1. // This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _XUA_H_ #ifndef _XUA_H_
#define _XUA_H_ #define _XUA_H_

View File

@@ -342,7 +342,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
int newSampleRate = buffer[0]; int newSampleRate = buffer[0];
/* Instruct audio thread to change sample freq (if change required) */ /* Instruct audio thread to change sample freq (if change required) */
//if(newSampleRate != g_curSamFreq) if(newSampleRate != g_curSamFreq)
{ {
int newMasterClock; int newMasterClock;
@@ -395,7 +395,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
} }
#endif /* MAX_FREQ != MIN_FREQ */ #endif /* MAX_FREQ != MIN_FREQ */
/* Send 0 Length as status stage */ /* Send 0 Length as status stage */
int x = XUD_DoSetRequestStatus(ep0_in); return XUD_DoSetRequestStatus(ep0_in);
} }
/* Direction: Device-to-host: Send Current Sample Freq */ /* Direction: Device-to-host: Send Current Sample Freq */
else else