Browse Source

Fix compilation errors sent from Stephane.

tags/1.9.8
Devin Anderson 14 years ago
parent
commit
94cd8d0be5
7 changed files with 20 additions and 21 deletions
  1. +2
    -0
      common/JackMidiAsyncWaitQueue.h
  2. +1
    -4
      macosx/coremidi/JackCoreMidiDriver.cpp
  3. +2
    -3
      macosx/coremidi/JackCoreMidiInputPort.cpp
  4. +6
    -5
      macosx/coremidi/JackCoreMidiOutputPort.cpp
  5. +3
    -7
      macosx/coremidi/JackCoreMidiUtil.cpp
  6. +6
    -1
      macosx/coremidi/JackCoreMidiUtil.h
  7. +0
    -1
      macosx/coremidi/JackCoreMidiVirtualOutputPort.cpp

+ 2
- 0
common/JackMidiAsyncWaitQueue.h View File

@@ -44,6 +44,8 @@ namespace Jack {

public:

using JackMidiAsyncQueue::EnqueueEvent;

/**
* Creates a new asynchronous MIDI wait message queue. The queue can
* store up to `max_messages` MIDI messages and up to `max_bytes` of


+ 1
- 4
macosx/coremidi/JackCoreMidiDriver.cpp View File

@@ -26,8 +26,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackCoreMidiUtil.h"
#include "JackEngineControl.h"

namespace Jack
{
using Jack::JackCoreMidiDriver;

///////////////////////////////////////////////////////////////////////////////
// Static callbacks
@@ -632,8 +631,6 @@ JackCoreMidiDriver::Write()
return 0;
}

} // end of namespace

#ifdef __cplusplus
extern "C" {
#endif


+ 2
- 3
macosx/coremidi/JackCoreMidiInputPort.cpp View File

@@ -100,9 +100,8 @@ JackCoreMidiInputPort::ProcessCoreMidi(const MIDIPacketList *packet_list)
sysex_bytes_sent = 0;
goto get_next_packet;
}
event.data = sysex_buffer;
event.buffer = sysex_buffer;
event.size = sysex_bytes_sent;
event.time = ;
sysex_bytes_sent = 0;
goto send_event;
}
@@ -115,7 +114,7 @@ JackCoreMidiInputPort::ProcessCoreMidi(const MIDIPacketList *packet_list)
goto buffer_sysex_bytes;
}
}
event.data = data;
event.buffer = data;
event.size = size;

send_event:


+ 6
- 5
macosx/coremidi/JackCoreMidiOutputPort.cpp View File

@@ -60,7 +60,7 @@ JackCoreMidiOutputPort::Execute()
if (! event) {
event = thread_queue->DequeueEvent((long) 0);
}
jack_midi_data_t *data = event->data;
jack_midi_data_t *data = event->buffer;

// This is the latest time that the packet list can be sent out. We
// may want to consider subtracting some frames to leave room for the
@@ -79,10 +79,10 @@ JackCoreMidiOutputPort::Execute()
if (! event) {
break;
}
packet = MIDIPacketListAdd(packet_list, midi_buffer_size,
packet = MIDIPacketListAdd(packet_list, sizeof(packet_buffer),
packet,
GetTimeStampFromFrames(event->time),
event->size, event->data);
event->size, event->buffer);
if (! packet) {
break;
}
@@ -107,8 +107,9 @@ JackCoreMidiOutputPort::Execute()
if (num_bytes > 256) {
num_bytes = 256;
}
packet = MIDIPacketListAdd(packet_list, midi_buffer_size,
packet, timestamp, num_bytes,
packet = MIDIPacketListAdd(packet_list,
sizeof(packet_buffer), packet,
timestamp, num_bytes,
data + bytes_sent);
if (! packet) {
break;


+ 3
- 7
macosx/coremidi/JackCoreMidiUtil.cpp View File

@@ -21,15 +21,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#include "JackError.h"
#include "JackCoreMidiUtil.h"
#import <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>

std::string
Jack::GetMacOSErrorString(OSStatus status)
{
char message[kMaxErrorLength + 1];
OSStatus result = GetErrorLongString(error, message,
(long) sizeof(message));
if (result != noErr) {
const char *message = GetMacOSStatusErrorString(status);
if (! message) {
std::stringstream stream;
stream << "error (code: '" << status << "')";
return stream.str();
@@ -42,6 +39,5 @@ Jack::WriteMacOSError(const char *jack_function, const char *mac_function,
OSStatus status)
{
jack_error("%s - %s: %s", jack_function, mac_function,
GetMacOSStatusString(status).c_str());
GetMacOSErrorString(status).c_str());
}


+ 6
- 1
macosx/coremidi/JackCoreMidiUtil.h View File

@@ -20,9 +20,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef __JackCoreMidiUtil__
#define __JackCoreMidiUtil__

#import <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>
#include <string>

#include <CarbonCore/Debugging.h>

// Import? What does this line do? Is it necessary now that I'm not including
// the same library I was including?
#import <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>

namespace Jack {

std::string


+ 0
- 1
macosx/coremidi/JackCoreMidiVirtualOutputPort.cpp View File

@@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#include <sstream>
#include <stdexcept>
#import <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>

#include "JackCoreMidiUtil.h"
#include "JackCoreMidiVirtualOutputPort.h"


Loading…
Cancel
Save