Browse Source

Cleanup

tags/1.9.4
falkTX 12 years ago
parent
commit
95e74413c1
3 changed files with 9 additions and 17 deletions
  1. +6
    -14
      source/backend/native/sunvox-file.cpp
  2. +2
    -2
      source/backend/plugin/NativePlugin.cpp
  3. +1
    -1
      source/includes/sunvox/sunvox.h

+ 6
- 14
source/backend/native/sunvox-file.cpp View File

@@ -33,12 +33,6 @@ public:
{
sv_open_slot(fSlot);
sv_set_autostop(fSlot, 0);

// TESTING
carla_stdout("sv_load");
sv_load(fSlot, "/home/falktx/bin/sunvox/examples/8bit_tales.sunvox");
carla_stdout("sv_load - FINISHED");
sv_play_from_beginning(fSlot);
}

~SunVoxFilePlugin() override
@@ -58,13 +52,14 @@ protected:
if (std::strcmp(key, "file") != 0)
return;

//sv_load(fSlot, value);
sv_load(fSlot, value);
sv_play_from_beginning(fSlot);
}

// -------------------------------------------------------------------
// Plugin process calls

void process(float** inBuf, float** outBuf, const uint32_t frames, const uint32_t, const MidiEvent* const) override
void process(float**, float** outBuf, const uint32_t frames, const uint32_t, const MidiEvent* const) override
{
const TimeInfo* const timePos = getTimeInfo();

@@ -78,13 +73,10 @@ protected:
svBuffer[j++] = outBuf[1][i];
}

//double tickFrame = double(timePos->frame)*sTicksPerFrame;
//int outTime = (timePos->usecs - ) & 0xFFFFFFFF;
unsigned int tick = 0; sv_get_ticks()& 0xFFFFFFFF;

sv_audio_callback(svBuffer, frames, 0, tick);
unsigned int ticks = sv_get_ticks();
ticks += timePos->frame * sTicksPerFrame;

printf("Line counter: %d, ticks: %u\n", sv_get_current_line(fSlot), tick);
sv_audio_callback(svBuffer, frames, 0, ticks+10000);
}
else
{


+ 2
- 2
source/backend/plugin/NativePlugin.cpp View File

@@ -41,7 +41,7 @@ void carla_register_all_plugins()
#ifndef CARLA_OS_WIN
carla_register_native_plugin_nekofilter();
#endif
//carla_register_native_plugin_sunvoxfile(); // unfinished
carla_register_native_plugin_sunvoxfile(); // unfinished

// Carla
//carla_register_native_plugin_carla(); // unfinished
@@ -510,7 +510,7 @@ public:
CARLA_ASSERT(type != nullptr);
CARLA_ASSERT(key != nullptr);
CARLA_ASSERT(value != nullptr);
carla_debug("DssiPlugin::setCustomData(%s, %s, %s, %s)", type, key, value, bool2str(sendGui));
carla_debug("NativePlugin::setCustomData(%s, %s, %s, %s)", type, key, value, bool2str(sendGui));

if (type == nullptr)
return carla_stderr2("NativePlugin::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is null", type, key, value, bool2str(sendGui));


+ 1
- 1
source/includes/sunvox/sunvox.h View File

@@ -54,7 +54,7 @@ typedef struct
#endif
#if defined(__linux__) || defined(linux)
#define LINUX
#define LIBNAME "./sunvox.so"
#define LIBNAME "sunvox.so"
#endif
#if defined(OSX) || defined(LINUX)
#define UNIX


Loading…
Cancel
Save