mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 09:36:33 +01:00
NOOP, add header-guards and namespace to CA backend
This commit is contained in:
parent
3c7b468c02
commit
efbc00651f
4 changed files with 27 additions and 4 deletions
|
|
@ -19,6 +19,8 @@
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
#include "coreaudio_pcmio.h"
|
#include "coreaudio_pcmio.h"
|
||||||
|
|
||||||
|
using namespace ARDOUR;
|
||||||
|
|
||||||
/* abstraction for deprecated CoreAudio */
|
/* abstraction for deprecated CoreAudio */
|
||||||
|
|
||||||
static OSStatus GetPropertyWrapper (
|
static OSStatus GetPropertyWrapper (
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __libbackend_coreaudio_pcmio_h__
|
||||||
|
#define __libbackend_coreaudio_pcmio_h__
|
||||||
|
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
#include <CoreAudio/CoreAudio.h>
|
#include <CoreAudio/CoreAudio.h>
|
||||||
#include <AudioUnit/AudioUnit.h>
|
#include <AudioUnit/AudioUnit.h>
|
||||||
|
|
@ -31,6 +34,8 @@
|
||||||
#define AUHAL_INPUT_ELEMENT 1
|
#define AUHAL_INPUT_ELEMENT 1
|
||||||
|
|
||||||
|
|
||||||
|
namespace ARDOUR {
|
||||||
|
|
||||||
class CoreAudioPCM {
|
class CoreAudioPCM {
|
||||||
public:
|
public:
|
||||||
CoreAudioPCM (void);
|
CoreAudioPCM (void);
|
||||||
|
|
@ -142,7 +147,7 @@ private:
|
||||||
AudioDeviceID *created_device);
|
AudioDeviceID *created_device);
|
||||||
|
|
||||||
|
|
||||||
AudioUnit _auhal;
|
::AudioUnit _auhal;
|
||||||
AudioDeviceID* _device_ids;
|
AudioDeviceID* _device_ids;
|
||||||
AudioBufferList* _input_audio_buffer_list;
|
AudioBufferList* _input_audio_buffer_list;
|
||||||
AudioBufferList* _output_audio_buffer_list;
|
AudioBufferList* _output_audio_buffer_list;
|
||||||
|
|
@ -188,3 +193,7 @@ private:
|
||||||
|
|
||||||
pthread_mutex_t _discovery_lock;
|
pthread_mutex_t _discovery_lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif /* __libbackend_coreaudio_pcmio_h__ */
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include "coremidi_io.h"
|
|
||||||
#include <CoreAudio/HostTime.h>
|
#include <CoreAudio/HostTime.h>
|
||||||
|
|
||||||
|
#include "coremidi_io.h"
|
||||||
|
|
||||||
|
using namespace ARDOUR;
|
||||||
|
|
||||||
static void notifyProc (const MIDINotification *message, void *refCon) {
|
static void notifyProc (const MIDINotification *message, void *refCon) {
|
||||||
CoreMidiIo *self = static_cast<CoreMidiIo*>(refCon);
|
CoreMidiIo *self = static_cast<CoreMidiIo*>(refCon);
|
||||||
self->notify_proc(message);
|
self->notify_proc(message);
|
||||||
|
|
@ -45,7 +48,7 @@ static void midiInputCallback(const MIDIPacketList *list, void *procRef, void *s
|
||||||
|
|
||||||
static std::string getPropertyString (MIDIObjectRef object, CFStringRef key)
|
static std::string getPropertyString (MIDIObjectRef object, CFStringRef key)
|
||||||
{
|
{
|
||||||
CFStringRef name = nil;
|
CFStringRef name = NULL;
|
||||||
std::string rv = "";
|
std::string rv = "";
|
||||||
if (noErr == MIDIObjectGetStringProperty(object, key, &name)) {
|
if (noErr == MIDIObjectGetStringProperty(object, key, &name)) {
|
||||||
const CFIndex size = CFStringGetMaximumSizeForEncoding(CFStringGetLength(name), kCFStringEncodingUTF8);
|
const CFIndex size = CFStringGetMaximumSizeForEncoding(CFStringGetLength(name), kCFStringEncodingUTF8);
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __libbackend_coremidi_io_h__
|
||||||
|
#define __libbackend_coremidi_io_h__
|
||||||
|
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
#include <CoreAudio/CoreAudio.h>
|
#include <CoreAudio/CoreAudio.h>
|
||||||
#include <AudioUnit/AudioUnit.h>
|
#include <AudioUnit/AudioUnit.h>
|
||||||
|
|
@ -30,6 +33,8 @@
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include "pbd/ringbuffer.h"
|
#include "pbd/ringbuffer.h"
|
||||||
|
|
||||||
|
namespace ARDOUR {
|
||||||
|
|
||||||
typedef struct _CoreMIDIPacket {
|
typedef struct _CoreMIDIPacket {
|
||||||
MIDITimeStamp timeStamp;
|
MIDITimeStamp timeStamp;
|
||||||
UInt16 length;
|
UInt16 length;
|
||||||
|
|
@ -113,3 +118,7 @@ private:
|
||||||
|
|
||||||
pthread_mutex_t _discovery_lock;
|
pthread_mutex_t _discovery_lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif /* __libbackend_coremidi_io */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue