forked from PAWPAW-Mirror/lib_xua
Merge pull request #318 from xross/develop
Reinstate check for current samplerate before changing
This commit is contained in:
@@ -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_
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user