changeset 319:ccd3c927638b tonioni

CoreAudio play target was never actually implemented, we use PortAudio on OS/X
author Chris Cannam
date Thu, 09 Jan 2014 21:31:54 +0000
parents 8611eb7be689
children 7105604e9803 5c69d40a0e30
files audioio/AudioCoreAudioTarget.cpp audioio/AudioCoreAudioTarget.h audioio/AudioTargetFactory.cpp svapp.pro
diffstat 4 files changed, 1 insertions(+), 111 deletions(-) [+]
line wrap: on
line diff
--- a/audioio/AudioCoreAudioTarget.cpp	Thu Jan 09 16:00:15 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
-
-/*
-    Sonic Visualiser
-    An audio file viewer and annotation editor.
-    Centre for Digital Music, Queen Mary, University of London.
-    This file copyright 2006 Chris Cannam.
-    
-    This program is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version.  See the file
-    COPYING included with this distribution for more information.
-*/
-
-#ifdef HAVE_COREAUDIO
-
-#include "AudioCoreAudioTarget.h"
-
-
-
-#endif
--- a/audioio/AudioCoreAudioTarget.h	Thu Jan 09 16:00:15 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
-
-/*
-    Sonic Visualiser
-    An audio file viewer and annotation editor.
-    Centre for Digital Music, Queen Mary, University of London.
-    This file copyright 2006 Chris Cannam.
-    
-    This program is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version.  See the file
-    COPYING included with this distribution for more information.
-*/
-
-#ifndef _AUDIO_CORE_AUDIO_TARGET_H_
-#define _AUDIO_CORE_AUDIO_TARGET_H_
-
-#ifdef HAVE_COREAUDIO
-
-#include <jack/jack.h>
-#include <vector>
-
-#include <CoreAudio/CoreAudio.h>
-#include <CoreAudio/CoreAudioTypes.h>
-#include <AudioUnit/AUComponent.h>
-#include <AudioUnit/AudioUnitProperties.h>
-#include <AudioUnit/AudioUnitParameters.h>
-#include <AudioUnit/AudioOutputUnit.h>
-
-#include "AudioCallbackPlayTarget.h"
-
-class AudioCallbackPlaySource;
-
-class AudioCoreAudioTarget : public AudioCallbackPlayTarget
-{
-    Q_OBJECT
-
-public:
-    AudioCoreAudioTarget(AudioCallbackPlaySource *source);
-    ~AudioCoreAudioTarget();
-
-    virtual bool isOK() const;
-
-public slots:
-    virtual void sourceModelReplaced();
-
-protected:
-    OSStatus process(void *data,
-		     AudioUnitRenderActionFlags *flags,
-		     const AudioTimeStamp *timestamp,
-		     unsigned int inbus,
-		     unsigned int inframes,
-		     AudioBufferList *ioData);
-
-    int m_bufferSize;
-    int m_sampleRate;
-    int m_latency;
-};
-
-#endif /* HAVE_COREAUDIO */
-
-#endif
-
--- a/audioio/AudioTargetFactory.cpp	Thu Jan 09 16:00:15 2014 +0000
+++ b/audioio/AudioTargetFactory.cpp	Thu Jan 09 21:31:54 2014 +0000
@@ -16,7 +16,6 @@
 #include "AudioTargetFactory.h"
 
 #include "AudioJACKTarget.h"
-#include "AudioCoreAudioTarget.h"
 #include "AudioPortAudioTarget.h"
 #include "AudioPulseAudioTarget.h"
 
@@ -54,10 +53,6 @@
     names.push_back("pulse");
 #endif
 
-#ifdef HAVE_COREAUDIO
-    names.push_back("core");
-#endif
-
 #ifdef HAVE_PORTAUDIO_2_0
     names.push_back("port");
 #endif
@@ -80,10 +75,6 @@
         return QCoreApplication::translate("AudioTargetFactory",
                                            "PulseAudio Server");
     }
-    if (name == "core") {
-        return QCoreApplication::translate("AudioTargetFactory",
-                                           "Core Audio Device");
-    }
     if (name == "port") {
         return QCoreApplication::translate("AudioTargetFactory",
                                            "Default Soundcard Device");
@@ -126,10 +117,6 @@
         if (m_default == "pulse") target = new AudioPulseAudioTarget(source);
 #endif
 
-#ifdef HAVE_COREAUDIO
-        if (m_default == "core") target = new AudioCoreAudioTarget(source);
-#endif
-
 #ifdef HAVE_PORTAUDIO_2_0
         if (m_default == "port") target = new AudioPortAudioTarget(source);
 #endif
@@ -160,15 +147,6 @@
 	delete target;
     }
 #endif
-
-#ifdef HAVE_COREAUDIO
-    target = new AudioCoreAudioTarget(source);
-    if (target->isOK()) return target;
-    else {
-	cerr << "WARNING: AudioTargetFactory::createCallbackTarget: Failed to open CoreAudio target" << endl;
-	delete target;
-    }
-#endif
     
 #ifdef HAVE_PORTAUDIO_2_0
     target = new AudioPortAudioTarget(source);
--- a/svapp.pro	Thu Jan 09 16:00:15 2014 +0000
+++ b/svapp.pro	Thu Jan 09 21:31:54 2014 +0000
@@ -22,7 +22,7 @@
         DEFINES += HAVE_PORTAUDIO_2_0
     }
     macx* {
-        DEFINES += HAVE_COREAUDIO
+        DEFINES += HAVE_COREAUDIO HAVE_PORTAUDIO_2_0
     }
 }
 
@@ -38,7 +38,6 @@
 
 HEADERS += audioio/AudioCallbackPlaySource.h \
            audioio/AudioCallbackPlayTarget.h \
-           audioio/AudioCoreAudioTarget.h \
            audioio/AudioGenerator.h \
            audioio/AudioJACKTarget.h \
            audioio/AudioPortAudioTarget.h \
@@ -50,7 +49,6 @@
 
 SOURCES += audioio/AudioCallbackPlaySource.cpp \
            audioio/AudioCallbackPlayTarget.cpp \
-           audioio/AudioCoreAudioTarget.cpp \
            audioio/AudioGenerator.cpp \
            audioio/AudioJACKTarget.cpp \
            audioio/AudioPortAudioTarget.cpp \