Commit 269c9903 authored by sletz's avatar sletz
Browse files

Cleanup.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4358 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 0d40e82f
......@@ -32,7 +32,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
jack_driver_desc_t * jackctl_driver_get_desc(jackctl_driver_t * driver);
EXPORT void jack_print_driver_options (jack_driver_desc_t* desc, FILE* file)
EXPORT void jack_print_driver_options(jack_driver_desc_t* desc, FILE* file)
{
unsigned long i;
char arg_default[JACK_DRIVER_PARAM_STRING_MAX + 1];
......@@ -88,8 +88,8 @@ EXPORT void jack_free_driver_params(JSList * driver_params)
}
}
int
jack_parse_driver_params (jack_driver_desc_t * desc, int argc, char* argv[], JSList ** param_ptr)
EXPORT int
jack_parse_driver_params(jack_driver_desc_t * desc, int argc, char* argv[], JSList ** param_ptr)
{
struct option * long_options;
char * options, * options_ptr;
......@@ -229,7 +229,7 @@ jack_parse_driver_params (jack_driver_desc_t * desc, int argc, char* argv[], JSL
}
EXPORT int
jackctl_parse_driver_params (jackctl_driver *driver_ptr, int argc, char* argv[])
jackctl_parse_driver_params(jackctl_driver *driver_ptr, int argc, char* argv[])
{
struct option * long_options;
char * options, * options_ptr;
......
......@@ -115,13 +115,13 @@ static void usage(FILE* file)
" [ --version OR -V ]\n"
" -d master-backend-name [ ... master-backend args ... ]\n"
#ifdef __APPLE__
" Available master backends may include: coreaudio, dummy or net.\n\n"
" Available master backends may include: coreaudio, dummy, net or netone.\n\n"
#endif
#ifdef WIN32
" Available master backends may include: portaudio, dummy or net.\n\n"
" Available master backends may include: portaudio, dummy, net or netone.\n\n"
#endif
#ifdef __linux__
" Available master backends may include: alsa, dummy, freebob, firewire or net\n\n"
" Available master backends may include: alsa, dummy, freebob, firewire, net or netone.\n\n"
#endif
#if defined(__sun__) || defined(sun)
" Available master backends may include: boomer, oss, dummy or net.\n\n"
......
......@@ -41,91 +41,90 @@ extern "C"
#define JACK_CONSTRAINT_FLAG_STRICT ((uint32_t)2) /**< if set, constraint is strict, i.e. supplying non-matching value will not work */
#define JACK_CONSTRAINT_FLAG_FAKE_VALUE ((uint32_t)4) /**< if set, values have no user meaningful meaning */
/** Driver parameter types */
typedef enum
{
JackDriverParamInt = 1,
JackDriverParamUInt,
JackDriverParamChar,
JackDriverParamString,
JackDriverParamBool
} jack_driver_param_type_t;
/** Driver parameter value */
typedef union
{
uint32_t ui;
int32_t i;
char c;
char str[JACK_DRIVER_PARAM_STRING_MAX + 1];
} jack_driver_param_value_t;
typedef struct {
jack_driver_param_value_t value;
char short_desc[64]; /**< A short (~30 chars) description for the user */
} jack_driver_param_value_enum_t;
typedef struct {
uint32_t flags; /**< JACK_CONSTRAINT_FLAG_XXX */
union {
struct {
jack_driver_param_value_t min;
jack_driver_param_value_t max;
} range; /**< valid when JACK_CONSTRAINT_FLAG_RANGE flag is set */
struct {
uint32_t count;
jack_driver_param_value_enum_t * possible_values_array;
} enumeration; /**< valid when JACK_CONSTRAINT_FLAG_RANGE flag is not set */
} constraint;
} jack_driver_param_constraint_desc_t;
/** A driver parameter descriptor */
typedef struct {
char name[JACK_DRIVER_NAME_MAX + 1]; /**< The parameter's name */
char character; /**< The parameter's character (for getopt, etc) */
jack_driver_param_type_t type; /**< The parameter's type */
jack_driver_param_value_t value; /**< The parameter's (default) value */
jack_driver_param_constraint_desc_t * constraint; /**< Pointer to parameter constraint descriptor. NULL if there is no constraint */
char short_desc[64]; /**< A short (~30 chars) description for the user */
char long_desc[1024]; /**< A longer description for the user */
}
jack_driver_param_desc_t;
/** A driver parameter */
typedef struct {
char character;
jack_driver_param_value_t value;
}
jack_driver_param_t;
/** A struct for describing a jack driver */
typedef struct {
char name[JACK_DRIVER_NAME_MAX + 1]; /**< The driver's canonical name */
char desc[JACK_DRIVER_PARAM_DESC + 1]; /**< The driver's extended description */
char file[JACK_PATH_MAX + 1]; /**< The filename of the driver's shared object file */
uint32_t nparams; /**< The number of parameters the driver has */
jack_driver_param_desc_t * params; /**< An array of parameter descriptors */
}
jack_driver_desc_t;
typedef struct {
uint32_t size; /* size of the param array, in elements */
}
jack_driver_desc_filler_t;
SERVER_EXPORT int jack_parse_driver_params (jack_driver_desc_t * desc, int argc, char* argv[], JSList ** param_ptr);
jack_driver_desc_t * /* newlly allocated driver descriptor, NULL on failure */
/** Driver parameter types */
typedef enum
{
JackDriverParamInt = 1,
JackDriverParamUInt,
JackDriverParamChar,
JackDriverParamString,
JackDriverParamBool
} jack_driver_param_type_t;
/** Driver parameter value */
typedef union
{
uint32_t ui;
int32_t i;
char c;
char str[JACK_DRIVER_PARAM_STRING_MAX + 1];
} jack_driver_param_value_t;
typedef struct {
jack_driver_param_value_t value;
char short_desc[64]; /**< A short (~30 chars) description for the user */
} jack_driver_param_value_enum_t;
typedef struct {
uint32_t flags; /**< JACK_CONSTRAINT_FLAG_XXX */
union {
struct {
jack_driver_param_value_t min;
jack_driver_param_value_t max;
} range; /**< valid when JACK_CONSTRAINT_FLAG_RANGE flag is set */
struct {
uint32_t count;
jack_driver_param_value_enum_t * possible_values_array;
} enumeration; /**< valid when JACK_CONSTRAINT_FLAG_RANGE flag is not set */
} constraint;
} jack_driver_param_constraint_desc_t;
/** A driver parameter descriptor */
typedef struct {
char name[JACK_DRIVER_NAME_MAX + 1]; /**< The parameter's name */
char character; /**< The parameter's character (for getopt, etc) */
jack_driver_param_type_t type; /**< The parameter's type */
jack_driver_param_value_t value; /**< The parameter's (default) value */
jack_driver_param_constraint_desc_t * constraint; /**< Pointer to parameter constraint descriptor. NULL if there is no constraint */
char short_desc[64]; /**< A short (~30 chars) description for the user */
char long_desc[1024]; /**< A longer description for the user */
}
jack_driver_param_desc_t;
/** A driver parameter */
typedef struct {
char character;
jack_driver_param_value_t value;
}
jack_driver_param_t;
/** A struct for describing a jack driver */
typedef struct {
char name[JACK_DRIVER_NAME_MAX + 1]; /**< The driver's canonical name */
char desc[JACK_DRIVER_PARAM_DESC + 1]; /**< The driver's extended description */
char file[JACK_PATH_MAX + 1]; /**< The filename of the driver's shared object file */
uint32_t nparams; /**< The number of parameters the driver has */
jack_driver_param_desc_t * params; /**< An array of parameter descriptors */
}
jack_driver_desc_t;
typedef struct {
uint32_t size; /* size of the param array, in elements */
}
jack_driver_desc_filler_t;
EXPORT int jack_parse_driver_params(jack_driver_desc_t * desc, int argc, char* argv[], JSList ** param_ptr);
EXPORT jack_driver_desc_t * /* newlly allocated driver descriptor, NULL on failure */
jack_driver_descriptor_construct(
const char * name, /* driver name */
const char * description, /* driver description */
jack_driver_desc_filler_t * filler); /* Pointer to stack var to be supplied to jack_driver_descriptor_add_parameter() as well.
Can be NULL for drivers that have no parameters. */
int /* 0 on failure */
EXPORT int /* 0 on failure */
jack_driver_descriptor_add_parameter(
jack_driver_desc_t * driver_descr, /* pointer to driver descriptor as returned by jack_driver_descriptor_construct() */
jack_driver_desc_filler_t * filler, /* Pointer to the stack var that was supplied to jack_driver_descriptor_add_parameter(). */
......
......@@ -24,18 +24,14 @@
#include <unistd.h>
#include <jack/types.h>
//#include <jack/driver.h>
#include <jack/jack.h>
#include <jack/transport.h>
#include "jack/jslist.h"
#if HAVE_CELT
#include <celt/celt.h>
#endif
//#include <netinet/in.h>
#ifdef __cplusplus
extern "C"
{
......
......@@ -34,12 +34,9 @@
#include <jack/jack.h>
#include <jack/types.h>
//#include <jack/engine.h>
#include <jack/jslist.h>
#include <jack/midiport.h>
//#include <netinet/in.h>
// The Packet Header.
#define CELT_MODE 1000 // Magic bitdepth value that indicates CELT compression
......
......@@ -51,10 +51,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
/* These two required by FreeBSD. */
#include <sys/types.h>
#include <jack/jack.h>
//#include <net_driver.h>
#include <netjack_packet.h>
#if HAVE_SAMPLERATE
#include <samplerate.h>
......
......@@ -22,7 +22,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackCoreMidiInputPort.h"
#include "JackMidiUtil.h"
//#include "types.h"
using Jack::JackCoreMidiInputPort;
......
......@@ -286,7 +286,7 @@ extern "C"
value.ui = 44100U;
jack_driver_descriptor_add_parameter(desc, &filler, "rate", 'r', JackDriverParamUInt, &value, NULL, "Sample rate", NULL);
value.ui = 128U;
value.ui = 512U;
jack_driver_descriptor_add_parameter(desc, &filler, "period", 'p', JackDriverParamUInt, &value, NULL, "Frames per period", NULL);
strcpy(value.str, "will take default PortAudio device name");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment