Browse Source

Add Native is_offline call

tags/1.9.4
falkTX 11 years ago
parent
commit
423109072f
2 changed files with 16 additions and 3 deletions
  1. +6
    -3
      source/backend/CarlaNative.h
  2. +10
    -0
      source/backend/CarlaNative.hpp

+ 6
- 3
source/backend/CarlaNative.h View File

@@ -74,7 +74,8 @@ typedef enum _PluginDispatcherOpcode {
PLUGIN_OPCODE_NULL = 0, // nothing
PLUGIN_OPCODE_BUFFER_SIZE_CHANGED = 1, // nothing
PLUGIN_OPCODE_SAMPLE_RATE_CHANGED = 2, // nothing
PLUGIN_OPCODE_UI_NAME_CHANGED = 3 // nothing
PLUGIN_OPCODE_OFFLINE_CHANGED = 3, // nothing
PLUGIN_OPCODE_UI_NAME_CHANGED = 4 // nothing
} PluginDispatcherOpcode;

typedef enum _HostDispatcherOpcode {
@@ -151,8 +152,10 @@ typedef struct _HostDescriptor {
const char* resource_dir;
const char* ui_name;

uint32_t (*get_buffer_size)(HostHandle handle);
double (*get_sample_rate)(HostHandle handle);
uint32_t (*get_buffer_size)(HostHandle handle);
double (*get_sample_rate)(HostHandle handle);
bool (*is_offline)(HostHandle handle);

const TimeInfo* (*get_time_info)(HostHandle handle);
bool (*write_midi_event)(HostHandle handle, const MidiEvent* event);



+ 10
- 0
source/backend/CarlaNative.hpp View File

@@ -89,6 +89,16 @@ protected:
return 0.0;
}

bool isOffline()
{
CARLA_ASSERT(kHost != nullptr);

if (kHost != nullptr)
return kHost->is_offline(kHost->handle);

return false;
}

const TimeInfo* getTimeInfo()
{
CARLA_ASSERT(kHost != nullptr);


Loading…
Cancel
Save