Created wrapper function so that c++ apps can access named quality / effect parameters.
This commit is contained in:
@@ -165,7 +165,7 @@ void KRAudioManager::renderAudio(UInt32 inNumberFrames, AudioBufferList *ioData)
|
|||||||
uint64_t end_time = mach_absolute_time();
|
uint64_t end_time = mach_absolute_time();
|
||||||
uint64_t duration = (end_time - start_time) * m_timebase_info.numer / m_timebase_info.denom; // Nanoseconds
|
uint64_t duration = (end_time - start_time) * m_timebase_info.numer / m_timebase_info.denom; // Nanoseconds
|
||||||
uint64_t max_duration = (uint64_t)inNumberFrames * 1000000000 / 44100;
|
uint64_t max_duration = (uint64_t)inNumberFrames * 1000000000 / 44100;
|
||||||
fprintf(stderr, "audio load: %5.1f%% hrtf channels: %li\n", (float)(duration * 1000 / max_duration) / 10.0f, m_mapped_sources.size());
|
// fprintf(stderr, "audio load: %5.1f%% hrtf channels: %li\n", (float)(duration * 1000 / max_duration) / 10.0f, m_mapped_sources.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
float *KRAudioManager::getBlockAddress(int block_offset)
|
float *KRAudioManager::getBlockAddress(int block_offset)
|
||||||
|
|||||||
@@ -41,6 +41,11 @@
|
|||||||
|
|
||||||
typedef enum KREngineParameterType {KRENGINE_PARAMETER_INT, KRENGINE_PARAMETER_FLOAT, KRENGINE_PARAMETER_BOOL} KREngineParameterType;
|
typedef enum KREngineParameterType {KRENGINE_PARAMETER_INT, KRENGINE_PARAMETER_FLOAT, KRENGINE_PARAMETER_BOOL} KREngineParameterType;
|
||||||
|
|
||||||
|
namespace kraken {
|
||||||
|
void set_parameter(const std::string ¶meter_name, float parameter_value);
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __OBJC__
|
||||||
|
|
||||||
@interface KREngine : NSObject
|
@interface KREngine : NSObject
|
||||||
|
|
||||||
@@ -72,3 +77,5 @@ typedef enum KREngineParameterType {KRENGINE_PARAMETER_INT, KRENGINE_PARAMETER_F
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,11 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
// Temporary wrapper function, until the KREngine class is refactored into the C++ codebase
|
||||||
|
void kraken::set_parameter(const std::string ¶meter_name, float parameter_value)
|
||||||
|
{
|
||||||
|
[[KREngine sharedInstance] setParameterValueWithName: [NSString stringWithUTF8String:parameter_name.c_str()] Value:parameter_value];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@interface KREngine() {
|
@interface KREngine() {
|
||||||
|
|||||||
Reference in New Issue
Block a user