Browse Source

Windows: alloca fixes for MSVC. Uses alloca instead of variable length array in JackMidiPort

pull/318/head
clvn 8 years ago
parent
commit
ff8740f20b
8 changed files with 32 additions and 0 deletions
  1. +4
    -0
      common/JackMidiPort.cpp
  2. +4
    -0
      common/JackNetOneDriver.cpp
  3. +4
    -0
      common/netjack.c
  4. +4
    -0
      common/netjack_packet.c
  5. +4
    -0
      example-clients/netmaster.c
  6. +4
    -0
      example-clients/server_control.cpp
  7. +4
    -0
      example-clients/session_notify.c
  8. +4
    -0
      example-clients/showtime.c

+ 4
- 0
common/JackMidiPort.cpp View File

@@ -99,7 +99,11 @@ static void MidiBufferMixdown(void* mixbuffer, void** src_buffers, int src_count
}
mix->Reset(nframes);

#if _MSC_VER
uint32_t* mix_index = (uint32_t*)_alloca(sizeof(uint32_t) * src_count);
#else
uint32_t mix_index[src_count];
#endif
int event_count = 0;
for (int i = 0; i < src_count; ++i) {
JackMidiBuffer* buf = static_cast<JackMidiBuffer*>(src_buffers[i]);


+ 4
- 0
common/JackNetOneDriver.cpp View File

@@ -44,6 +44,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <opus/opus_custom.h>
#endif

#ifdef _MSC_VER
#define alloca _alloca
#endif

#define MIN(x,y) ((x)<(y) ? (x) : (y))

using namespace std;


+ 4
- 0
common/netjack.c View File

@@ -63,6 +63,10 @@ $Id: net_driver.c,v 1.17 2006/04/16 20:16:10 torbenh Exp $

#define MIN(x,y) ((x)<(y) ? (x) : (y))

#ifdef _MSC_VER
#define alloca _alloca
#endif

static int sync_state = 1;
static jack_transport_state_t last_transport_state;



+ 4
- 0
common/netjack_packet.c View File

@@ -86,6 +86,10 @@
#define jack_error printf
#endif

#ifdef _MSC_VER
#define alloca _alloca
#endif

int fraggo = 0;

void


+ 4
- 0
example-clients/netmaster.c View File

@@ -31,6 +31,10 @@

#include <jack/net.h>

#ifdef _MSC_VER
#define alloca _alloca
#endif

jack_net_master_t* net;

#define BUFFER_SIZE 512


+ 4
- 0
example-clients/server_control.cpp View File

@@ -27,6 +27,10 @@
#include <jack/jack.h>
#include <jack/control.h>

#ifdef _MSC_VER
#define alloca _alloca
#endif

static jackctl_driver_t * jackctl_server_get_driver(jackctl_server_t *server, const char *driver_name)
{
const JSList * node_ptr = jackctl_server_get_drivers_list(server);


+ 4
- 0
example-clients/session_notify.c View File

@@ -31,6 +31,10 @@
#include <jack/transport.h>
#include <jack/session.h>

#ifdef _MSC_VER
#define alloca _alloca
#endif

char *package; /* program name */
jack_client_t *client;



+ 4
- 0
example-clients/showtime.c View File

@@ -26,6 +26,10 @@
#include <jack/jack.h>
#include <jack/transport.h>

#ifdef _MSC_VER
#define alloca _alloca
#endif

jack_client_t *client;

static void


Loading…
Cancel
Save