AkLinuxSoundEngine.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*******************************************************************************
  2. The content of this file includes portions of the AUDIOKINETIC Wwise Technology
  3. released in source code form as part of the SDK installer package.
  4. Commercial License Usage
  5. Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
  6. may use this file in accordance with the end user license agreement provided
  7. with the software or, alternatively, in accordance with the terms contained in a
  8. written agreement between you and Audiokinetic Inc.
  9. Apache License Usage
  10. Alternatively, this file may be used under the Apache License, Version 2.0 (the
  11. "Apache License"); you may not use this file except in compliance with the
  12. Apache License. You may obtain a copy of the Apache License at
  13. http://www.apache.org/licenses/LICENSE-2.0.
  14. Unless required by applicable law or agreed to in writing, software distributed
  15. under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
  16. OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
  17. the specific language governing permissions and limitations under the License.
  18. Copyright (c) 2023 Audiokinetic Inc.
  19. *******************************************************************************/
  20. // AkLinuxSoundEngine.h
  21. /// \file
  22. /// Main Sound Engine interface, specific to Linux.
  23. #pragma once
  24. #include <AK/SoundEngine/Common/AkTypes.h>
  25. #include <AK/Tools/Common/AkPlatformFuncs.h>
  26. ///< API used for audio output
  27. ///< Use with AkPlatformInitSettings to select the API used for audio output.
  28. ///< Use AkAPI_Default, it will select the more appropriate API depending on the computer's capabilities. Other values should be used for testing purposes.
  29. ///< \sa AK::SoundEngine::Init
  30. typedef enum AkAudioAPILinux
  31. {
  32. AkAPI_PulseAudio = 1 << 0, ///< Use PulseAudio (this is the preferred API on Linux)
  33. AkAPI_ALSA = 1 << 1, ///< Use ALSA
  34. AkAPI_Default = AkAPI_PulseAudio | AkAPI_ALSA, ///< Default value, will select the more appropriate API
  35. } AkAudioAPI;
  36. /// Platform specific initialization settings
  37. /// \sa AK::SoundEngine::Init
  38. /// \sa AK::SoundEngine::GetDefaultPlatformInitSettings
  39. struct AkPlatformInitSettings
  40. {
  41. // Threading model.
  42. AkThreadProperties threadLEngine; ///< Lower engine threading properties
  43. AkThreadProperties threadOutputMgr; ///< Ouput thread threading properties
  44. AkThreadProperties threadBankManager; ///< Bank manager threading properties (its default priority is AK_THREAD_PRIORITY_NORMAL)
  45. AkThreadProperties threadMonitor; ///< Monitor threading properties (its default priority is AK_THREAD_PRIORITY_ABOVENORMAL). This parameter is not used in Release build.
  46. //Voices.
  47. AkUInt32 uSampleRate; ///< Sampling Rate. Default 48000 Hz
  48. AkUInt16 uNumRefillsInVoice; ///< Number of refill buffers in voice buffer. 2 == double-buffered, defaults to 4.
  49. AkAudioAPI eAudioAPI; ///< Main audio API to use. Leave to AkAPI_Default for the default sink (default value).
  50. ///< If a valid audioDeviceShareset plug-in is provided, the AkAudioAPI will be Ignored.
  51. ///< \ref AkAudioAPI
  52. AkDataTypeID sampleType; ///< Sample type. AK_FLOAT for 32 bit float, AK_INT for 16 bit signed integer, defaults to AK_FLOAT.
  53. ///< Supported by AkAPI_PulseAudio only.
  54. };