bio2jack.c File Reference

Go to the source code of this file.

Classes

struct  wave_header_s
struct  message_s
struct  jack_driver_s

Typedefs

typedef struct wave_header_s wave_header_t
typedef struct message_s message_t
typedef struct jack_driver_s jack_driver_t
typedef jack_default_audio_sample_t sample_t
typedef jack_nframes_t nframes_t

Enumerations

enum  cmd_enum { CMD_SET_POSITION }

Functions

static void JACK_CloseDevice (jack_driver_t *drv, bool close_client)
static void JACK_CloseDevice (jack_driver_t *drv)
static int JACK_OpenDevice (jack_driver_t *drv)
static long JACK_GetBytesFreeSpaceFromDriver (jack_driver_t *drv)
static void JACK_ResetFromDriver (jack_driver_t *drv)
static long JACK_GetPositionFromDriver (jack_driver_t *drv, enum pos_enum position, int type)
long TimeValDifference (struct timeval *start, struct timeval *end)
jack_driver_tgetDriver (int deviceID)
void releaseDriver (jack_driver_t *drv)
char * DEBUGSTATE (enum status_enum state)
static void float_volume_effect (sample_t *buf, unsigned long nsamples, float volume)
static void sample_move_d16_d16 (short *dst, short *src, unsigned long nsamples, int nDstChannels, int nSrcChannels)
static void sample_move_d16_s16 (sample_t *dst, short *src, unsigned long nsamples, unsigned long src_skip)
void sample_silence_dS (sample_t *dst, unsigned long nsamples)
static int JACK_callback (nframes_t nframes, void *arg)
static int JACK_bufsize (nframes_t nframes, void *arg)
int JACK_srate (nframes_t nframes, void *arg)
void JACK_shutdown (void *arg)
static void JACK_Error (const char *desc)
static bool JACK_SendMessage (jack_driver_t *this, enum cmd_enum command, long data)
void JACK_Reset (int deviceID)
int JACK_Open (int *deviceID, unsigned int bits_per_channel, unsigned long *rate, int channels)
int JACK_OpenEx (int *deviceID, unsigned int bits_per_channel, unsigned long *rate, unsigned int input_channels, unsigned int output_channels, const char **jack_port_name, unsigned int jack_port_name_count, unsigned long jack_port_flags)
int JACK_Close (int deviceID)
long JACK_Write (int deviceID, unsigned char *data, unsigned long bytes)
static void JACK_exit (int deviceID)
static int JACK_SetVolumeForChannelFromDriver (jack_driver_t *drv, unsigned int channel, unsigned int volume)
int JACK_SetVolumeForChannel (int deviceID, unsigned int channel, unsigned int volume)
int JACK_SetAllVolume (int deviceID, unsigned int volume)
void JACK_GetVolumeForChannel (int deviceID, unsigned int channel, unsigned int *volume)
enum JACK_VOLUME_TYPE JACK_SetVolumeEffectType (int deviceID, enum JACK_VOLUME_TYPE type)
int JACK_SetState (int deviceID, enum status_enum state)
enum status_enum JACK_GetState (int deviceID)
long JACK_GetOutputBytesPerSecond (int deviceID)
static long JACK_GetInputBytesPerSecondFromDriver (jack_driver_t *drv)
long JACK_GetInputBytesPerSecond (int deviceID)
static long JACK_GetBytesStoredFromDriver (jack_driver_t *drv)
long JACK_GetBytesStored (int deviceID)
long JACK_GetBytesFreeSpace (int deviceID)
long JACK_GetPosition (int deviceID, enum pos_enum position, int type)
void JACK_SetPositionFromDriver (jack_driver_t *drv, enum pos_enum position, long value)
void JACK_SetPosition (int deviceID, enum pos_enum position, long value)
long JACK_GetBytesPerOutputFrame (int deviceID)
long JACK_GetMaxBufferedBytes (int deviceID)
void JACK_SetMaxBufferedBytes (int deviceID, long max_buffered_bytes)
int JACK_GetNumOutputChannels (int deviceID)
int JACK_GetNumInputChannels (int deviceID)
int JACK_SetNumOutputChannels (int deviceID, int channels)
int JACK_SetNumInputChannels (int deviceID, int channels)
long JACK_GetSampleRate (int deviceID)
void JACK_Init (void)
long JACK_GetJackLatency (int deviceID)
unsigned long JACK_GetJackBufferedBytes (int deviceID)
bool test_sample_move_d16_d16 (void)

Variables

static int first_free_device = 0
static jack_driver_t outDev [MAX_OUTDEVICES]
static long MAX_BUFFERED_BYTES = (long)(16 * 2 * (44100/(1/SECONDS))) / 8


Typedef Documentation

typedef struct wave_header_s wave_header_t

typedef struct message_s message_t

typedef struct jack_driver_s jack_driver_t

typedef jack_default_audio_sample_t sample_t

Definition at line 158 of file bio2jack.c.

typedef jack_nframes_t nframes_t

Definition at line 159 of file bio2jack.c.


Enumeration Type Documentation

enum cmd_enum

Enumerator:
CMD_SET_POSITION 

Definition at line 86 of file bio2jack.c.


Function Documentation

static void JACK_CloseDevice ( jack_driver_t drv,
bool  close_client 
) [static]

Definition at line 946 of file bio2jack.c.

Referenced by JACK_Close(), JACK_exit(), JACK_OpenDevice(), and JACK_OpenEx().

static void JACK_CloseDevice ( jack_driver_t drv  )  [static]

static int JACK_OpenDevice ( jack_driver_t drv  )  [static]

Definition at line 755 of file bio2jack.c.

Referenced by getDriver(), JACK_OpenEx(), and JACK_shutdown().

static long JACK_GetBytesFreeSpaceFromDriver ( jack_driver_t drv  )  [static]

Definition at line 1480 of file bio2jack.c.

Referenced by JACK_GetBytesFreeSpace(), and JACK_Write().

static void JACK_ResetFromDriver ( jack_driver_t drv  )  [static]

Definition at line 1003 of file bio2jack.c.

Referenced by JACK_Close(), JACK_CloseDevice(), JACK_OpenEx(), and JACK_Reset().

static long JACK_GetPositionFromDriver ( jack_driver_t drv,
enum pos_enum  position,
int  type 
) [static]

long TimeValDifference ( struct timeval *  start,
struct timeval *  end 
)

Definition at line 187 of file bio2jack.c.

Referenced by getDriver(), and JACK_GetPositionFromDriver().

jack_driver_t* getDriver ( int  deviceID  ) 

void releaseDriver ( jack_driver_t drv  ) 

char* DEBUGSTATE ( enum status_enum  state  ) 

Definition at line 240 of file bio2jack.c.

Referenced by JACK_callback(), JACK_GetState(), and JACK_SetState().

static void float_volume_effect ( sample_t buf,
unsigned long  nsamples,
float  volume 
) [static]

Definition at line 261 of file bio2jack.c.

Referenced by JACK_callback().

static void sample_move_d16_d16 ( short *  dst,
short *  src,
unsigned long  nsamples,
int  nDstChannels,
int  nSrcChannels 
) [static]

Definition at line 274 of file bio2jack.c.

Referenced by JACK_callback(), and test_sample_move_d16_d16().

static void sample_move_d16_s16 ( sample_t dst,
short *  src,
unsigned long  nsamples,
unsigned long  src_skip 
) [static]

Definition at line 320 of file bio2jack.c.

Referenced by JACK_callback().

void sample_silence_dS ( sample_t dst,
unsigned long  nsamples 
)

Definition at line 333 of file bio2jack.c.

Referenced by JACK_callback().

static int JACK_callback ( nframes_t  nframes,
void *  arg 
) [static]

Definition at line 350 of file bio2jack.c.

Referenced by JACK_OpenDevice().

static int JACK_bufsize ( nframes_t  nframes,
void *  arg 
) [static]

Definition at line 644 of file bio2jack.c.

Referenced by JACK_OpenDevice().

int JACK_srate ( nframes_t  nframes,
void *  arg 
)

Definition at line 676 of file bio2jack.c.

Referenced by JACK_OpenDevice().

void JACK_shutdown ( void *  arg  ) 

Definition at line 689 of file bio2jack.c.

Referenced by JACK_OpenDevice().

static void JACK_Error ( const char *  desc  )  [static]

Definition at line 712 of file bio2jack.c.

Referenced by JACK_OpenDevice().

static bool JACK_SendMessage ( jack_driver_t this,
enum cmd_enum  command,
long  data 
) [static]

Definition at line 723 of file bio2jack.c.

void JACK_Reset ( int  deviceID  ) 

Definition at line 1014 of file bio2jack.c.

Referenced by JACK_Init().

int JACK_Open ( int *  deviceID,
unsigned int  bits_per_channel,
unsigned long *  rate,
int  channels 
)

Definition at line 1033 of file bio2jack.c.

int JACK_OpenEx ( int *  deviceID,
unsigned int  bits_per_channel,
unsigned long *  rate,
unsigned int  input_channels,
unsigned int  output_channels,
const char **  jack_port_name,
unsigned int  jack_port_name_count,
unsigned long  jack_port_flags 
)

Definition at line 1049 of file bio2jack.c.

Referenced by JACK_Open(), and AudioOutputJACK::OpenDevice().

int JACK_Close ( int  deviceID  ) 

Definition at line 1163 of file bio2jack.c.

Referenced by AudioOutputJACK::CloseDevice().

long JACK_Write ( int  deviceID,
unsigned char *  data,
unsigned long  bytes 
)

Definition at line 1189 of file bio2jack.c.

Referenced by AudioOutputJACK::WriteAudio().

static void JACK_exit ( int  deviceID  )  [static]

Definition at line 1262 of file bio2jack.c.

static int JACK_SetVolumeForChannelFromDriver ( jack_driver_t drv,
unsigned int  channel,
unsigned int  volume 
) [static]

Definition at line 1275 of file bio2jack.c.

Referenced by JACK_SetAllVolume(), and JACK_SetVolumeForChannel().

int JACK_SetVolumeForChannel ( int  deviceID,
unsigned int  channel,
unsigned int  volume 
)

Definition at line 1292 of file bio2jack.c.

Referenced by AudioOutputJACK::SetVolumeChannel().

int JACK_SetAllVolume ( int  deviceID,
unsigned int  volume 
)

Definition at line 1303 of file bio2jack.c.

Referenced by AudioOutputJACK::VolumeInit().

void JACK_GetVolumeForChannel ( int  deviceID,
unsigned int  channel,
unsigned int *  volume 
)

Definition at line 1325 of file bio2jack.c.

Referenced by AudioOutputJACK::GetVolumeChannel().

enum JACK_VOLUME_TYPE JACK_SetVolumeEffectType ( int  deviceID,
enum JACK_VOLUME_TYPE  type 
)

Definition at line 1348 of file bio2jack.c.

int JACK_SetState ( int  deviceID,
enum status_enum  state 
)

Definition at line 1365 of file bio2jack.c.

enum status_enum JACK_GetState ( int  deviceID  ) 

Definition at line 1390 of file bio2jack.c.

long JACK_GetOutputBytesPerSecond ( int  deviceID  ) 

Definition at line 1403 of file bio2jack.c.

static long JACK_GetInputBytesPerSecondFromDriver ( jack_driver_t drv  )  [static]

long JACK_GetInputBytesPerSecond ( int  deviceID  ) 

Definition at line 1432 of file bio2jack.c.

static long JACK_GetBytesStoredFromDriver ( jack_driver_t drv  )  [static]

Definition at line 1448 of file bio2jack.c.

Referenced by JACK_GetBytesStored().

long JACK_GetBytesStored ( int  deviceID  ) 

Definition at line 1471 of file bio2jack.c.

Referenced by AudioOutputJACK::getBufferedOnSoundcard().

long JACK_GetBytesFreeSpace ( int  deviceID  ) 

long JACK_GetPosition ( int  deviceID,
enum pos_enum  position,
int  type 
)

Definition at line 1572 of file bio2jack.c.

void JACK_SetPositionFromDriver ( jack_driver_t drv,
enum pos_enum  position,
long  value 
)

Definition at line 1587 of file bio2jack.c.

Referenced by JACK_SetNumInputChannels(), and JACK_SetPosition().

void JACK_SetPosition ( int  deviceID,
enum pos_enum  position,
long  value 
)

Definition at line 1611 of file bio2jack.c.

Referenced by AudioOutputJACK::OpenDevice().

long JACK_GetBytesPerOutputFrame ( int  deviceID  ) 

Definition at line 1622 of file bio2jack.c.

long JACK_GetMaxBufferedBytes ( int  deviceID  ) 

Definition at line 1632 of file bio2jack.c.

void JACK_SetMaxBufferedBytes ( int  deviceID,
long  max_buffered_bytes 
)

Definition at line 1644 of file bio2jack.c.

Referenced by AudioOutputJACK::OpenDevice().

int JACK_GetNumOutputChannels ( int  deviceID  ) 

Definition at line 1652 of file bio2jack.c.

int JACK_GetNumInputChannels ( int  deviceID  ) 

Definition at line 1662 of file bio2jack.c.

int JACK_SetNumOutputChannels ( int  deviceID,
int  channels 
)

Definition at line 1671 of file bio2jack.c.

int JACK_SetNumInputChannels ( int  deviceID,
int  channels 
)

Definition at line 1681 of file bio2jack.c.

long JACK_GetSampleRate ( int  deviceID  ) 

Definition at line 1705 of file bio2jack.c.

void JACK_Init ( void   ) 

Definition at line 1715 of file bio2jack.c.

Referenced by AudioOutputJACK::AudioOutputJACK().

long JACK_GetJackLatency ( int  deviceID  ) 

Definition at line 1752 of file bio2jack.c.

unsigned long JACK_GetJackBufferedBytes ( int  deviceID  ) 

Definition at line 1764 of file bio2jack.c.

Referenced by AudioOutputJACK::OpenDevice().

bool test_sample_move_d16_d16 ( void   ) 

Definition at line 1778 of file bio2jack.c.


Variable Documentation

int first_free_device = 0 [static]

Definition at line 162 of file bio2jack.c.

Referenced by JACK_Close(), and JACK_OpenEx().

jack_driver_t outDev[MAX_OUTDEVICES] [static]

Definition at line 164 of file bio2jack.c.

long MAX_BUFFERED_BYTES = (long)(16 * 2 * (44100/(1/SECONDS))) / 8 [static]


Generated on Sat Dec 18 05:15:51 2010 for MythTV by  doxygen 1.5.5