version 1.9, 2015/07/24 08:46:35 |
version 1.10, 2015/12/20 11:38:33 |
|
|
#include "defs.h" |
#include "defs.h" |
#include "dev.h" |
#include "dev.h" |
#include "dsp.h" |
#include "dsp.h" |
|
#include "fdpass.h" |
#include "file.h" |
#include "file.h" |
#include "siofile.h" |
#include "siofile.h" |
#include "utils.h" |
#include "utils.h" |
|
|
struct sio_par par; |
struct sio_par par; |
unsigned int mode = d->mode & (MODE_PLAY | MODE_REC); |
unsigned int mode = d->mode & (MODE_PLAY | MODE_REC); |
|
|
d->sio.hdl = sio_open(d->path, mode, 1); |
d->sio.hdl = fdpass_sio_open(d->num, mode); |
if (d->sio.hdl == NULL) { |
if (d->sio.hdl == NULL) { |
if (mode != (SIO_PLAY | SIO_REC)) |
if (mode != (SIO_PLAY | SIO_REC)) |
return 0; |
return 0; |
d->sio.hdl = sio_open(d->path, SIO_PLAY, 1); |
d->sio.hdl = fdpass_sio_open(d->num, SIO_PLAY); |
if (d->sio.hdl != NULL) |
if (d->sio.hdl != NULL) |
mode = SIO_PLAY; |
mode = SIO_PLAY; |
else { |
else { |
d->sio.hdl = sio_open(d->path, SIO_REC, 1); |
d->sio.hdl = fdpass_sio_open(d->num, SIO_REC); |
if (d->sio.hdl != NULL) |
if (d->sio.hdl != NULL) |
mode = SIO_REC; |
mode = SIO_REC; |
else |
else |