diff options
| author | crueter <crueter@eden-emu.dev> | 2025-08-04 04:50:14 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-08-04 04:50:14 +0200 |
| commit | 51b170b470ed587f99a7c2a773e4464687f0d07a (patch) | |
| tree | 4c03c510cfb17a5f5d6233df490d78f06dcfa7f7 /externals/oboe/src/opensles/OpenSLESUtilities.cpp | |
| parent | 04e5e6453875ffa5c79cdb421a29bc19985b1049 (diff) | |
[cmake] refactor: Use CPM over submodules (#143)
Transfers the majority of submodules and large externals to CPM, using source archives rather than full Git clones. Not only does this save massive amounts of clone and configure time, but dependencies are grabbed on-demand rather than being required by default. Additionally, CPM will (generally) automatically search for system dependencies, though certain dependencies have options to control this.
Testing shows gains ranging from 5x to 10x in terms of overall clone/configure time.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/143
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to 'externals/oboe/src/opensles/OpenSLESUtilities.cpp')
| -rw-r--r-- | externals/oboe/src/opensles/OpenSLESUtilities.cpp | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/externals/oboe/src/opensles/OpenSLESUtilities.cpp b/externals/oboe/src/opensles/OpenSLESUtilities.cpp deleted file mode 100644 index e81445d249..0000000000 --- a/externals/oboe/src/opensles/OpenSLESUtilities.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "OpenSLESUtilities.h" - -namespace oboe { - -/* - * OSLES Helpers - */ - -const char *getSLErrStr(SLresult code) { - switch (code) { - case SL_RESULT_SUCCESS: - return "SL_RESULT_SUCCESS"; - case SL_RESULT_PRECONDITIONS_VIOLATED: - return "SL_RESULT_PRECONDITIONS_VIOLATED"; - case SL_RESULT_PARAMETER_INVALID: - return "SL_RESULT_PARAMETER_INVALID"; - case SL_RESULT_MEMORY_FAILURE: - return "SL_RESULT_MEMORY_FAILURE"; - case SL_RESULT_RESOURCE_ERROR: - return "SL_RESULT_RESOURCE_ERROR"; - case SL_RESULT_RESOURCE_LOST: - return "SL_RESULT_RESOURCE_LOST"; - case SL_RESULT_IO_ERROR: - return "SL_RESULT_IO_ERROR"; - case SL_RESULT_BUFFER_INSUFFICIENT: - return "SL_RESULT_BUFFER_INSUFFICIENT"; - case SL_RESULT_CONTENT_CORRUPTED: - return "SL_RESULT_CONTENT_CORRUPTED"; - case SL_RESULT_CONTENT_UNSUPPORTED: - return "SL_RESULT_CONTENT_UNSUPPORTED"; - case SL_RESULT_CONTENT_NOT_FOUND: - return "SL_RESULT_CONTENT_NOT_FOUND"; - case SL_RESULT_PERMISSION_DENIED: - return "SL_RESULT_PERMISSION_DENIED"; - case SL_RESULT_FEATURE_UNSUPPORTED: - return "SL_RESULT_FEATURE_UNSUPPORTED"; - case SL_RESULT_INTERNAL_ERROR: - return "SL_RESULT_INTERNAL_ERROR"; - case SL_RESULT_UNKNOWN_ERROR: - return "SL_RESULT_UNKNOWN_ERROR"; - case SL_RESULT_OPERATION_ABORTED: - return "SL_RESULT_OPERATION_ABORTED"; - case SL_RESULT_CONTROL_LOST: - return "SL_RESULT_CONTROL_LOST"; - default: - return "Unknown SL error"; - } -} - -SLAndroidDataFormat_PCM_EX OpenSLES_createExtendedFormat( - SLDataFormat_PCM format, SLuint32 representation) { - SLAndroidDataFormat_PCM_EX format_pcm_ex; - format_pcm_ex.formatType = SL_ANDROID_DATAFORMAT_PCM_EX; - format_pcm_ex.numChannels = format.numChannels; - format_pcm_ex.sampleRate = format.samplesPerSec; - format_pcm_ex.bitsPerSample = format.bitsPerSample; - format_pcm_ex.containerSize = format.containerSize; - format_pcm_ex.channelMask = format.channelMask; - format_pcm_ex.endianness = format.endianness; - format_pcm_ex.representation = representation; - return format_pcm_ex; -} - -SLuint32 OpenSLES_ConvertFormatToRepresentation(AudioFormat format) { - switch(format) { - case AudioFormat::I16: - return SL_ANDROID_PCM_REPRESENTATION_SIGNED_INT; - case AudioFormat::Float: - return SL_ANDROID_PCM_REPRESENTATION_FLOAT; - case AudioFormat::I24: - case AudioFormat::I32: - case AudioFormat::IEC61937: - case AudioFormat::Invalid: - case AudioFormat::Unspecified: - case AudioFormat::MP3: - case AudioFormat::AAC_LC: - case AudioFormat::AAC_HE_V1: - case AudioFormat::AAC_HE_V2: - case AudioFormat::AAC_ELD: - case AudioFormat::AAC_XHE: - case AudioFormat::OPUS: - default: - return 0; - } -} - -} // namespace oboe |
