Changeset 9209c79


Ignore:
Timestamp:
Mar 27, 2014, 7:56:11 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
4a17757
Parents:
dba9b33
Message:

wscript, src/io/*.c: use custom defines instead of APPLE

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink.c

    rdba9b33 r9209c79  
    2424#include "fmat.h"
    2525#include "io/sink.h"
    26 #ifdef __APPLE__
     26#ifdef HAVE_SINK_APPLE_AUDIO
    2727#include "io/sink_apple_audio.h"
    28 #endif /* __APPLE__ */
     28#endif /* HAVE_SINK_APPLE_AUDIO */
    2929#ifdef HAVE_SNDFILE
    3030#include "io/sink_sndfile.h"
     
    5757aubio_sink_t * new_aubio_sink(char_t * uri, uint_t samplerate) {
    5858  aubio_sink_t * s = AUBIO_NEW(aubio_sink_t);
    59 #ifdef __APPLE__
     59#ifdef HAVE_SINK_APPLE_AUDIO
    6060  s->sink = (void *)new_aubio_sink_apple_audio(uri, samplerate);
    6161  if (s->sink) {
     
    7070    return s;
    7171  }
    72 #endif /* __APPLE__ */
     72#endif /* HAVE_SINK_APPLE_AUDIO */
    7373#if HAVE_SNDFILE
    7474  s->sink = (void *)new_aubio_sink_sndfile(uri, samplerate);
  • src/io/sink_apple_audio.c

    rdba9b33 r9209c79  
    2121#include "config.h"
    2222
    23 #ifdef __APPLE__
     23#ifdef HAVE_SINK_APPLE_AUDIO
    2424
    2525#include "aubio_priv.h"
     
    267267}
    268268
    269 #endif /* __APPLE__ */
     269#endif /* HAVE_SINK_APPLE_AUDIO */
  • src/io/source.c

    rdba9b33 r9209c79  
    2727#include "io/source_avcodec.h"
    2828#endif /* HAVE_LIBAV */
    29 #ifdef __APPLE__
     29#ifdef HAVE_SOURCE_APPLE_AUDIO
    3030#include "io/source_apple_audio.h"
    31 #endif /* __APPLE__ */
     31#endif /* HAVE_SOURCE_APPLE_AUDIO */
    3232#ifdef HAVE_SNDFILE
    3333#include "io/source_sndfile.h"
     
    7171  }
    7272#endif /* HAVE_LIBAV */
    73 #ifdef __APPLE__
     73#ifdef HAVE_SOURCE_APPLE_AUDIO
    7474  s->source = (void *)new_aubio_source_apple_audio(uri, samplerate, hop_size);
    7575  if (s->source) {
     
    8383    return s;
    8484  }
    85 #endif /* __APPLE__ */
     85#endif /* HAVE_SOURCE_APPLE_AUDIO */
    8686#if HAVE_SNDFILE
    8787  s->source = (void *)new_aubio_source_sndfile(uri, samplerate, hop_size);
  • src/io/source_apple_audio.c

    rdba9b33 r9209c79  
    1919*/
    2020
    21 #ifdef __APPLE__
    2221#include "config.h"
     22
     23#ifdef HAVE_SOURCE_APPLE_AUDIO
     24
    2325#include "aubio_priv.h"
    2426#include "fvec.h"
     
    303305}
    304306
    305 #endif /* __APPLE__ */
     307#endif /* HAVE_SOURCE_APPLE_AUDIO */
  • src/io/utils_apple_audio.c

    rdba9b33 r9209c79  
    1 #ifdef __APPLE__
     1#include "config.h"
     2
     3#if defined(HAVE_SOURCE_APPLE_AUDIO) || defined(HAVE_SINK_APPLE_AUDIO)
    24
    35// CFURLRef, CFURLCreateWithFileSystemPath, ...
     
    5355}
    5456
    55 #endif /* __APPLE__ */
     57#endif /* defined(HAVE_SOURCE_APPLE_AUDIO) || defined(HAVE_SINK_APPLE_AUDIO) */
  • wscript

    rdba9b33 r9209c79  
    106106        ctx.env.CFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
    107107        ctx.env.LINKFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
     108
     109    if target_platform in [ 'darwin', 'ios', 'iosimulator']:
    108110        ctx.env.FRAMEWORK = ['CoreFoundation', 'AudioToolbox', 'Accelerate']
     111        ctx.define('HAVE_SOURCE_APPLE_AUDIO', 1)
     112        ctx.define('HAVE_SINK_APPLE_AUDIO', 1)
    109113        ctx.define('HAVE_ACCELERATE', 1)
    110114
    111115    if target_platform in [ 'ios', 'iosimulator' ]:
    112         ctx.define('HAVE_ACCELERATE', 1)
    113116        ctx.define('TARGET_OS_IPHONE', 1)
    114         ctx.env.FRAMEWORK = ['CoreFoundation', 'AudioToolbox', 'Accelerate']
    115117        SDKVER="7.0"
    116118        MINSDKVER="6.1"
Note: See TracChangeset for help on using the changeset viewer.