1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#pragma once
4
5#include "BsCorePrerequisites.h"
6#include "Importer/BsImportOptions.h"
7#include "Audio/BsAudioClip.h"
8
9namespace bs
10{
11 /** @addtogroup Importer
12 * @{
13 */
14
15 /** Contains import options you may use to control how an audio clip is imported. */
16 class BS_CORE_EXPORT BS_SCRIPT_EXPORT(m:Importer,api:bsf,api:bed) AudioClipImportOptions : public ImportOptions
17 {
18 public:
19 AudioClipImportOptions() = default;
20
21 /** Audio format to import the audio clip as. */
22 BS_SCRIPT_EXPORT()
23 AudioFormat format = AudioFormat::PCM;
24
25 /** Determines how is audio data loaded into memory. */
26 BS_SCRIPT_EXPORT()
27 AudioReadMode readMode = AudioReadMode::LoadDecompressed;
28
29 /**
30 * Determines should the clip be played as spatial (3D) audio or as normal audio. 3D clips will be converted
31 * to mono on import.
32 */
33 BS_SCRIPT_EXPORT()
34 bool is3D = true;
35
36 /** Size of a single sample in bits. The clip will be converted to this bit depth on import. */
37 BS_SCRIPT_EXPORT()
38 UINT32 bitDepth = 16;
39
40 // Note: Add options to resample to a different frequency
41
42 /** Creates a new import options object that allows you to customize how are audio clips imported. */
43 BS_SCRIPT_EXPORT(ec:T)
44 static SPtr<AudioClipImportOptions> create();
45
46 /************************************************************************/
47 /* SERIALIZATION */
48 /************************************************************************/
49 public:
50 friend class AudioClipImportOptionsRTTI;
51 static RTTITypeBase* getRTTIStatic();
52 RTTITypeBase* getRTTI() const override;
53 };
54
55 /** @} */
56}
57