|
1 | 1 | #pragma once |
2 | 2 |
|
| 3 | +#include "BSISoundDescriptor.h" |
3 | 4 | #include "RE/B/BSAudioCallbacks.h" |
4 | 5 | #include "RE/B/BSAudioInit.h" |
5 | 6 | #include "RE/B/BSISoundDescriptor.h" |
@@ -37,18 +38,25 @@ namespace RE |
37 | 38 | return *singleton; |
38 | 39 | } |
39 | 40 |
|
40 | | - void GetSoundHandleByName(BSSoundHandle& a_handle, const char* a_soundName, float a_distance, std::uint32_t a_usageFlags, BSISoundDescriptor::ExtraResolutionData* a_data) |
| 41 | + bool GetSoundHandle(BSSoundHandle& a_handle, const BSISoundDescriptor* a_descriptor, float a_distance, std::uint32_t a_usageFlags, BSISoundDescriptor::ExtraResolutionData* a_data = nullptr) |
| 42 | + { |
| 43 | + using func_t = decltype(&BSAudioManager::GetSoundHandle); |
| 44 | + static REL::Relocation<func_t> func{ ID::BSAudioManager::GetSoundHandle }; |
| 45 | + return func(this, a_handle, a_descriptor, a_distance, a_usageFlags, a_data); |
| 46 | + } |
| 47 | + |
| 48 | + void GetSoundHandleByName(BSSoundHandle& a_handle, const char* a_soundName, float a_distance, std::uint32_t a_usageFlags, BSISoundDescriptor::ExtraResolutionData* a_data = nullptr) |
41 | 49 | { |
42 | 50 | using func_t = decltype(&BSAudioManager::GetSoundHandleByName); |
43 | 51 | static REL::Relocation<func_t> func{ ID::BSAudioManager::GetSoundHandleByName }; |
44 | | - return func(this, a_handle, a_soundName, a_distance, a_usageFlags, a_data); |
| 52 | + func(this, a_handle, a_soundName, a_distance, a_usageFlags, a_data); |
45 | 53 | } |
46 | 54 |
|
47 | 55 | void GetSoundHandleByFile(BSSoundHandle& a_handle, const BSResource::ID& a_file, std::uint32_t a_usageFlags, std::uint8_t a_priority) |
48 | 56 | { |
49 | 57 | using func_t = decltype(&BSAudioManager::GetSoundHandleByFile); |
50 | 58 | static REL::Relocation<func_t> func{ ID::BSAudioManager::GetSoundHandleByFile }; |
51 | | - return func(this, a_handle, a_file, a_usageFlags, a_priority); |
| 59 | + func(this, a_handle, a_file, a_usageFlags, a_priority); |
52 | 60 | } |
53 | 61 |
|
54 | 62 | // members |
|
0 commit comments