Audio-ESD
view release on metacpan or search on metacpan
* Written by David Huggins-Daines <dhd@cepstral.com>
*/
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <esd.h>
static int
not_here(char *s)
{
croak("%s not implemented on this architecture", s);
return -1;
}
static double
constant(char *name, int arg)
{
errno = 0;
switch (*name) {
break;
case 'C':
break;
case 'D':
break;
case 'E':
if (strEQ(name, "ESD_ADPCM"))
#ifdef ESD_ADPCM
return ESD_ADPCM;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_BITS16"))
#ifdef ESD_BITS16
return ESD_BITS16;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_BITS8"))
#ifdef ESD_BITS8
return ESD_BITS8;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_BUF_SIZE"))
#ifdef ESD_BUF_SIZE
return ESD_BUF_SIZE;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_DEFAULT_PORT"))
#ifdef ESD_DEFAULT_PORT
return ESD_DEFAULT_PORT;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_DEFAULT_RATE"))
#ifdef ESD_DEFAULT_RATE
return ESD_DEFAULT_RATE;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_ENDIAN_KEY"))
#ifdef ESD_ENDIAN_KEY
return ESD_ENDIAN_KEY;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_KEY_LEN"))
#ifdef ESD_KEY_LEN
return ESD_KEY_LEN;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_LOOP"))
#ifdef ESD_LOOP
return ESD_LOOP;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_MASK_BITS"))
#ifdef ESD_MASK_BITS
return ESD_MASK_BITS;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_MASK_CHAN"))
#ifdef ESD_MASK_CHAN
return ESD_MASK_CHAN;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_MASK_FUNC"))
#ifdef ESD_MASK_FUNC
return ESD_MASK_FUNC;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_MASK_MODE"))
#ifdef ESD_MASK_MODE
return ESD_MASK_MODE;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_MONITOR"))
#ifdef ESD_MONITOR
return ESD_MONITOR;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_MONO"))
#ifdef ESD_MONO
return ESD_MONO;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_NAME_MAX"))
#ifdef ESD_NAME_MAX
return ESD_NAME_MAX;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_PLAY"))
#ifdef ESD_PLAY
return ESD_PLAY;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_RECORD"))
#ifdef ESD_RECORD
return ESD_RECORD;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_SAMPLE"))
#ifdef ESD_SAMPLE
return ESD_SAMPLE;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_STEREO"))
#ifdef ESD_STEREO
return ESD_STEREO;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_STOP"))
#ifdef ESD_STOP
return ESD_STOP;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_STREAM"))
#ifdef ESD_STREAM
return ESD_STREAM;
#else
goto not_there;
#endif
if (strEQ(name, "ESD_VOLUME_BASE"))
#ifdef ESD_VOLUME_BASE
return ESD_VOLUME_BASE;
#else
goto not_there;
#endif
break;
case 'F':
break;
case 'G':
break;
case 'H':
break;
case 'I':
break;
case 'X':
break;
case 'Y':
break;
case 'Z':
break;
}
errno = EINVAL;
return 0;
not_there:
errno = ENOENT;
return 0;
}
typedef int SysRet;
typedef int my_esd_t;
MODULE = Audio::ESD PACKAGE = Audio::ESD
double
( run in 0.808 second using v1.01-cache-2.11-cpan-cc502c75498 )