1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Add 24000 Hz to standard device sample rates to support Airpods Pro

This commit is contained in:
Tom Poole 2022-01-21 16:38:49 +00:00
parent e0e8e85d6b
commit de97e53a87
4 changed files with 4 additions and 4 deletions

View file

@ -50,7 +50,7 @@ namespace
static void getDeviceSampleRates (snd_pcm_t* handle, Array<double>& rates)
{
const int ratesToTry[] = { 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000, 0 };
const int ratesToTry[] = { 22050, 24000, 32000, 44100, 48000, 88200, 96000, 176400, 192000, 0 };
snd_pcm_hw_params_t* hwParams;
snd_pcm_hw_params_alloca (&hwParams);

View file

@ -294,7 +294,7 @@ public:
if (OK (AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, ranges)))
{
for (auto r : { 8000, 11025, 16000, 22050, 32000,
for (auto r : { 8000, 11025, 16000, 22050, 24000, 32000,
44100, 48000, 88200, 96000, 176400,
192000, 352800, 384000, 705600, 768000 })
{

View file

@ -350,7 +350,7 @@ public:
if (asioObject != nullptr)
{
for (auto rate : { 8000, 11025, 16000, 22050, 32000,
for (auto rate : { 8000, 11025, 16000, 22050, 24000, 32000,
44100, 48000, 88200, 96000, 176400,
192000, 352800, 384000, 705600, 768000 })
if (asioObject->canSampleRate ((double) rate) == 0)

View file

@ -676,7 +676,7 @@ private:
void querySupportedSampleRates (WAVEFORMATEXTENSIBLE format, ComSmartPtr<IAudioClient>& audioClient)
{
for (auto rate : { 8000, 11025, 16000, 22050, 32000,
for (auto rate : { 8000, 11025, 16000, 22050, 24000, 32000,
44100, 48000, 88200, 96000, 176400,
192000, 352800, 384000, 705600, 768000 })
{