JACK-AUDIO-CONNECTION-KIT: types.h Source File

# types.h

Go to the documentation of this file.

    00001 /*
    00002     Copyright (C) 2001 Paul Davis
    00003     Copyright (C) 2004 Jack O'Quin
    00004
    00005     This program is free software; you can redistribute it and/or modify
    00006     it under the terms of the GNU Lesser General Public License as published by
    00007     the Free Software Foundation; either version 2.1 of the License, or
    00008     (at your option) any later version.
    00009
    00010     This program is distributed in the hope that it will be useful,
    00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013     GNU Lesser General Public License for more details.
    00014
    00015     You should have received a copy of the GNU Lesser General Public License
    00016     along with this program; if not, write to the Free Software
    00017     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018
    00019 */
    00020
    00021 #ifndef __jack_types_h__
    00022 #define __jack_types_h__
    00023
    00024 #include <inttypes.h>
    00025
    00026 typedef int32_t jack_shmsize_t;
    00027
    00031 typedef uint32_t             jack_nframes_t;
    00032
    00036 #define JACK_MAX_FRAMES (4294967295U)   /* This should be UINT32_MAX, but
    00037                                            C++ has a problem with that. */
    00038
    00043 typedef uint64_t jack_time_t;
    00044
    00049 #define JACK_LOAD_INIT_LIMIT 1024
    00050
    00056 typedef uint64_t jack_intclient_t;
    00057
    00062 typedef struct _jack_port    jack_port_t;
    00063
    00068 typedef struct _jack_client  jack_client_t;
    00069
    00074 typedef uint32_t             jack_port_id_t;
    00075
    00088 typedef int  (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
    00089
    00102 typedef void  (*JackThreadInitCallback)(void *arg);
    00103
    00112 typedef int  (*JackGraphOrderCallback)(void *arg);
    00113
    00124 typedef int  (*JackXRunCallback)(void *arg);
    00125
    00140 typedef int  (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
    00141
    00151 typedef int  (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
    00152
    00162 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg);
    00163
    00173 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg);
    00174
    00185 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
    00186
    00194 typedef void (*JackFreewheelCallback)(int starting, void *arg);
    00195
    00196 typedef void *(*JackThreadCallback)(void* arg);
    00197
    00202 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
    00203 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
    00204
    00210 typedef float jack_default_audio_sample_t;
    00211
    00218 enum JackPortFlags {
    00219
    00224      JackPortIsInput = 0x1,
    00225
    00230      JackPortIsOutput = 0x2,
    00231
    00236      JackPortIsPhysical = 0x4,
    00237
    00251      JackPortCanMonitor = 0x8,
    00252
    00267      JackPortIsTerminal = 0x10
    00268 };
    00269
    00273 enum JackOptions {
    00274
    00278      JackNullOption = 0x00,
    00279
    00286      JackNoStartServer = 0x01,
    00287
    00292      JackUseExactName = 0x02,
    00293
    00297      JackServerName = 0x04,
    00298
    00303      JackLoadName = 0x08,
    00304
    00309      JackLoadInit = 0x10
    00310 };
    00311
    00313 #define JackOpenOptions (JackServerName|JackNoStartServer|JackUseExactName)
    00314
    00316 #define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
    00317
    00322 typedef enum JackOptions jack_options_t;
    00323
    00327 enum JackStatus {
    00328
    00332      JackFailure = 0x01,
    00333
    00337      JackInvalidOption = 0x02,
    00338
    00348      JackNameNotUnique = 0x04,
    00349
    00356      JackServerStarted = 0x08,
    00357
    00361      JackServerFailed = 0x10,
    00362
    00366      JackServerError = 0x20,
    00367
    00371      JackNoSuchClient = 0x40,
    00372
    00376      JackLoadFailure = 0x80,
    00377
    00381      JackInitFailure = 0x100,
    00382
    00386      JackShmFailure = 0x200,
    00387
    00391      JackVersionError = 0x400
    00392 };
    00393
    00398 typedef enum JackStatus jack_status_t;
    00399
    00400 #endif /* __jack_types_h__ */