prepare audio handling for multi carrier SDR
This commit is contained in:
@@ -638,7 +638,7 @@ void process_call(int c)
|
||||
|
||||
/* handle audio, if sound device is used */
|
||||
|
||||
int16_t samples[call.latspl];
|
||||
int16_t samples[call.latspl], *spl_list[1];
|
||||
int count;
|
||||
int rc;
|
||||
|
||||
@@ -670,7 +670,8 @@ void process_call(int c)
|
||||
default:
|
||||
jitter_load(&call.audio, up, count);
|
||||
}
|
||||
rc = sound_write(call.sound, up, up, count);
|
||||
spl_list[0] = up;
|
||||
rc = sound_write(call.sound, spl_list, count, 1);
|
||||
if (rc < 0) {
|
||||
PDEBUG(DSENDER, DEBUG_ERROR, "Failed to write TX data to sound device (rc = %d)\n", rc);
|
||||
if (rc == -EPIPE)
|
||||
@@ -678,7 +679,8 @@ void process_call(int c)
|
||||
return;
|
||||
}
|
||||
}
|
||||
count = sound_read(call.sound, samples, samples, call.latspl);
|
||||
spl_list[0] = samples;
|
||||
count = sound_read(call.sound, spl_list, call.latspl, 1);
|
||||
if (count < 0) {
|
||||
PDEBUG(DSENDER, DEBUG_ERROR, "Failed to read from sound device (rc = %d)!\n", count);
|
||||
if (count == -EPIPE)
|
||||
|
@@ -7,7 +7,6 @@ extern const char *call_sounddev;
|
||||
extern int samplerate;
|
||||
extern int interval;
|
||||
extern int latency;
|
||||
extern int cross_channels;
|
||||
extern int uses_emphasis;
|
||||
extern int do_pre_emphasis;
|
||||
extern int do_de_emphasis;
|
||||
|
@@ -42,7 +42,6 @@ const char *call_sounddev = "";
|
||||
int samplerate = 48000;
|
||||
int interval = 1;
|
||||
int latency = 50;
|
||||
int cross_channels = 0;
|
||||
int uses_emphasis = 1;
|
||||
int do_pre_emphasis = 0;
|
||||
int do_de_emphasis = 0;
|
||||
@@ -81,9 +80,6 @@ void print_help_common(const char *arg0, const char *ext_usage)
|
||||
printf(" increase latency accordingly.\n");
|
||||
printf(" -b --buffer <ms>\n");
|
||||
printf(" How many milliseconds are processed in advance (default = '%d')\n", latency);
|
||||
printf(" -x --cross\n");
|
||||
printf(" Cross channels on sound card. 1st channel (right) is swapped with\n");
|
||||
printf(" second channel (left)\n");
|
||||
if (uses_emphasis) {
|
||||
printf(" -p --pre-emphasis\n");
|
||||
printf(" Enable pre-emphasis, if you directly connect to the oscillator of the\n");
|
||||
@@ -137,7 +133,6 @@ static struct option long_options_common[] = {
|
||||
{"samplerate", 1, 0, 's'},
|
||||
{"interval", 1, 0, 'i'},
|
||||
{"buffer", 1, 0, 'b'},
|
||||
{"cross", 0, 0, 'x'},
|
||||
{"pre-emphasis", 0, 0, 'p'},
|
||||
{"de-emphasis", 0, 0, 'd'},
|
||||
{"rx-gain", 0, 0, 'g'},
|
||||
@@ -152,7 +147,7 @@ static struct option long_options_common[] = {
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
const char *optstring_common = "hv:k:a:s:i:b:xpdg:mc:t:l:r:";
|
||||
const char *optstring_common = "hv:k:a:s:i:b:pdg:mc:t:l:r:";
|
||||
|
||||
struct option *long_options;
|
||||
char *optstring;
|
||||
@@ -232,10 +227,6 @@ void opt_switch_common(int c, char *arg0, int *skip_args)
|
||||
latency = atoi(optarg);
|
||||
*skip_args += 2;
|
||||
break;
|
||||
case 'x':
|
||||
cross_channels = 1;
|
||||
*skip_args += 1;
|
||||
break;
|
||||
case 'p':
|
||||
if (!uses_emphasis) {
|
||||
no_emph:
|
||||
|
@@ -32,7 +32,7 @@ static sender_t **sender_tailp = &sender_head;
|
||||
int cant_recover = 0;
|
||||
|
||||
/* Init transceiver instance and link to list of transceivers. */
|
||||
int sender_create(sender_t *sender, int kanal, const char *sounddev, int samplerate, int cross_channels, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, int loopback, double loss_volume, enum pilot_signal pilot_signal)
|
||||
int sender_create(sender_t *sender, int kanal, const char *sounddev, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, int loopback, double loss_volume, enum pilot_signal pilot_signal)
|
||||
{
|
||||
sender_t *master;
|
||||
int rc = 0;
|
||||
@@ -40,7 +40,6 @@ int sender_create(sender_t *sender, int kanal, const char *sounddev, int sampler
|
||||
sender->kanal = kanal;
|
||||
strncpy(sender->sounddev, sounddev, sizeof(sender->sounddev) - 1);
|
||||
sender->samplerate = samplerate;
|
||||
sender->cross_channels = cross_channels;
|
||||
sender->rx_gain = rx_gain;
|
||||
sender->pre_emphasis = pre_emphasis;
|
||||
sender->de_emphasis = de_emphasis;
|
||||
@@ -66,6 +65,7 @@ int sender_create(sender_t *sender, int kanal, const char *sounddev, int sampler
|
||||
break;
|
||||
}
|
||||
if (master) {
|
||||
// FIXME: link more than two channels
|
||||
if (master->slave) {
|
||||
PDEBUG(DSENDER, DEBUG_ERROR, "Sound device '%s' cannot be used for channel %d. It is already shared by channel %d and %d!\n", sounddev, kanal, master->kanal, master->slave->kanal);
|
||||
rc = -EBUSY;
|
||||
@@ -86,8 +86,9 @@ int sender_create(sender_t *sender, int kanal, const char *sounddev, int sampler
|
||||
rc = -EBUSY;
|
||||
goto error;
|
||||
}
|
||||
/* link us to a master */
|
||||
/* link us to a master/slave */
|
||||
master->slave = sender;
|
||||
// FIXME: link more than two channels, so link to last slave
|
||||
sender->master = master;
|
||||
} else {
|
||||
/* open own device */
|
||||
@@ -163,11 +164,6 @@ void sender_destroy(sender_t *sender)
|
||||
sender_tailp = &((*sender_tailp)->next);
|
||||
}
|
||||
|
||||
if (sender->slave)
|
||||
sender->slave->master = NULL;
|
||||
if (sender->master)
|
||||
sender->master->slave = NULL;
|
||||
|
||||
if (sender->sound) {
|
||||
sound_close(sender->sound);
|
||||
sender->sound = NULL;
|
||||
@@ -219,9 +215,22 @@ static void gain_samples(int16_t *samples, int length, double gain)
|
||||
/* Handle audio streaming of one transceiver. */
|
||||
void process_sender_audio(sender_t *sender, int *quit, int latspl)
|
||||
{
|
||||
sender_t *slave = sender->slave;
|
||||
int16_t samples[latspl], pilot[latspl], slave_samples[latspl];
|
||||
sender_t *inst;
|
||||
int rc, count;
|
||||
int num_chan, i;
|
||||
|
||||
/* count instances for audio channel */
|
||||
for (num_chan = 0, inst = sender; inst; num_chan++, inst = inst->slave);
|
||||
if (sender->pilot_signal) {
|
||||
if (num_chan != 1) {
|
||||
PDEBUG(DSENDER, DEBUG_ERROR, "Software error, please fix!\n");
|
||||
abort();
|
||||
}
|
||||
num_chan++;
|
||||
}
|
||||
int16_t buff[num_chan][latspl], *samples[num_chan];
|
||||
for (i = 0; i < num_chan; i++)
|
||||
samples[i] = buff[i];
|
||||
|
||||
count = sound_get_inbuffer(sender->sound);
|
||||
if (count < 0) {
|
||||
@@ -239,103 +248,60 @@ cant_recover:
|
||||
}
|
||||
if (count < latspl) {
|
||||
count = latspl - count;
|
||||
/* load TX data from audio loop or from sender instance */
|
||||
if (sender->loopback == 3)
|
||||
jitter_load(&sender->audio, samples, count);
|
||||
else
|
||||
sender_send(sender, samples, count);
|
||||
if (sender->wave_tx_rec.fp)
|
||||
wave_write(&sender->wave_tx_rec, samples, count);
|
||||
/* internal loopback: loop back TX audio to RX */
|
||||
if (sender->loopback == 1) {
|
||||
if (sender->wave_rx_rec.fp)
|
||||
wave_write(&sender->wave_rx_rec, samples, count);
|
||||
display_wave(sender, samples, count);
|
||||
sender_receive(sender, samples, count);
|
||||
}
|
||||
/* do pre emphasis towards radio, not wave_write */
|
||||
if (sender->pre_emphasis)
|
||||
pre_emphasis(&sender->estate, samples, count);
|
||||
/* do above for audio slave, if set */
|
||||
if (slave) {
|
||||
if (slave->loopback == 3)
|
||||
jitter_load(&slave->audio, slave_samples, count);
|
||||
/* loop through all channels */
|
||||
for (i = 0, inst = sender; inst; i++, inst = inst->slave) {
|
||||
/* load TX data from audio loop or from sender instance */
|
||||
if (inst->loopback == 3)
|
||||
jitter_load(&inst->audio, samples[i], count);
|
||||
else
|
||||
sender_send(slave, slave_samples, count);
|
||||
if (sender->wave_tx_rec.fp)
|
||||
wave_write(&slave->wave_tx_rec, slave_samples, count);
|
||||
/* internal loopback, if audio slave is set */
|
||||
if (slave && slave->loopback == 1) {
|
||||
if (slave->wave_rx_rec.fp)
|
||||
wave_write(&slave->wave_rx_rec, slave_samples, count);
|
||||
display_wave(slave, slave_samples, count);
|
||||
sender_receive(slave, slave_samples, count);
|
||||
sender_send(inst, samples[i], count);
|
||||
if (inst->wave_tx_rec.fp)
|
||||
wave_write(&inst->wave_tx_rec, samples[i], count);
|
||||
/* internal loopback: loop back TX audio to RX */
|
||||
if (inst->loopback == 1) {
|
||||
if (inst->wave_rx_rec.fp)
|
||||
wave_write(&inst->wave_rx_rec, samples[i], count);
|
||||
display_wave(inst, samples[i], count);
|
||||
sender_receive(inst, samples[i], count);
|
||||
}
|
||||
/* do pre emphasis towards radio, not wave_write */
|
||||
if (slave->pre_emphasis)
|
||||
pre_emphasis(&slave->estate, slave_samples, count);
|
||||
if (inst->pre_emphasis)
|
||||
pre_emphasis(&inst->estate, samples[i], count);
|
||||
}
|
||||
switch (sender->pilot_signal) {
|
||||
case PILOT_SIGNAL_TONE:
|
||||
/* tone if pilot signal is on */
|
||||
if (sender->pilot_on)
|
||||
gen_pilotton(sender, pilot, count);
|
||||
gen_pilotton(sender, samples[1], count);
|
||||
else
|
||||
memset(pilot, 0, count << 1);
|
||||
if (!sender->cross_channels)
|
||||
rc = sound_write(sender->sound, samples, pilot, count);
|
||||
else
|
||||
rc = sound_write(sender->sound, pilot, samples, count);
|
||||
memset(samples[1], 0, count << 1);
|
||||
break;
|
||||
case PILOT_SIGNAL_NOTONE:
|
||||
/* tone if pilot signal is off */
|
||||
if (!sender->pilot_on)
|
||||
gen_pilotton(sender, pilot, count);
|
||||
gen_pilotton(sender, samples[1], count);
|
||||
else
|
||||
memset(pilot, 0, count << 1);
|
||||
if (!sender->cross_channels)
|
||||
rc = sound_write(sender->sound, samples, pilot, count);
|
||||
else
|
||||
rc = sound_write(sender->sound, pilot, samples, count);
|
||||
memset(samples[1], 0, count << 1);
|
||||
break;
|
||||
case PILOT_SIGNAL_POSITIVE:
|
||||
/* positive signal if pilot signal is on */
|
||||
if (sender->pilot_on)
|
||||
memset(pilot, 127, count << 1);
|
||||
memset(samples[1], 127, count << 1);
|
||||
else
|
||||
memset(pilot, 128, count << 1);
|
||||
if (!sender->cross_channels)
|
||||
rc = sound_write(sender->sound, samples, pilot, count);
|
||||
else
|
||||
rc = sound_write(sender->sound, pilot, samples, count);
|
||||
memset(samples[1], 128, count << 1);
|
||||
break;
|
||||
case PILOT_SIGNAL_NEGATIVE:
|
||||
/* negative signal if pilot signal is on */
|
||||
if (sender->pilot_on)
|
||||
memset(pilot, 128, count << 1);
|
||||
memset(samples[1], 128, count << 1);
|
||||
else
|
||||
memset(pilot, 127, count << 1);
|
||||
if (!sender->cross_channels)
|
||||
rc = sound_write(sender->sound, samples, pilot, count);
|
||||
else
|
||||
rc = sound_write(sender->sound, pilot, samples, count);
|
||||
memset(samples[1], 127, count << 1);
|
||||
break;
|
||||
case PILOT_SIGNAL_NONE:
|
||||
break;
|
||||
default:
|
||||
/* if audio slave is set, write audio of both sender instances */
|
||||
if (slave) {
|
||||
if (!sender->cross_channels)
|
||||
rc = sound_write(sender->sound, samples, slave_samples, count);
|
||||
else
|
||||
rc = sound_write(sender->sound, slave_samples, samples, count);
|
||||
}else {
|
||||
/* use pilot tone buffer for silence */
|
||||
memset(pilot, 0, count << 1);
|
||||
if (!sender->cross_channels)
|
||||
rc = sound_write(sender->sound, samples, pilot, count);
|
||||
else
|
||||
rc = sound_write(sender->sound, pilot, samples, count);
|
||||
}
|
||||
}
|
||||
|
||||
rc = sound_write(sender->sound, samples, count, num_chan);
|
||||
if (rc < 0) {
|
||||
PDEBUG(DSENDER, DEBUG_ERROR, "Failed to write TX data to sound device (rc = %d)\n", rc);
|
||||
if (rc == -EPIPE) {
|
||||
@@ -347,11 +313,7 @@ cant_recover:
|
||||
}
|
||||
}
|
||||
|
||||
if (!sender->cross_channels)
|
||||
count = sound_read(sender->sound, samples, slave_samples, latspl);
|
||||
else
|
||||
count = sound_read(sender->sound, slave_samples, samples, latspl);
|
||||
//printf("count=%d time= %.4f\n", count, (double)count * 1000 / sender->samplerate);
|
||||
count = sound_read(sender->sound, samples, latspl, num_chan);
|
||||
if (count < 0) {
|
||||
PDEBUG(DSENDER, DEBUG_ERROR, "Failed to read from sound device (rc = %d)!\n", count);
|
||||
if (count == -EPIPE) {
|
||||
@@ -362,38 +324,24 @@ cant_recover:
|
||||
return;
|
||||
}
|
||||
if (count) {
|
||||
/* rx gain */
|
||||
if (sender->rx_gain != 1.0)
|
||||
gain_samples(samples, count, sender->rx_gain);
|
||||
/* do de emphasis from radio (then write_wave/wave_read), receive audio, process echo test */
|
||||
if (sender->de_emphasis)
|
||||
de_emphasis(&sender->estate, samples, count);
|
||||
if (sender->wave_rx_play.fp)
|
||||
wave_read(&sender->wave_rx_play, samples, count);
|
||||
if (sender->loopback != 1) {
|
||||
if (sender->wave_rx_rec.fp)
|
||||
wave_write(&sender->wave_rx_rec, samples, count);
|
||||
display_wave(sender, samples, count);
|
||||
sender_receive(sender, samples, count);
|
||||
}
|
||||
if (sender->loopback == 3)
|
||||
jitter_save(&sender->audio, samples, count);
|
||||
/* do above for audio slave, if set */
|
||||
if (slave) {
|
||||
if (sender->rx_gain != 1.0)
|
||||
gain_samples(slave_samples, count, slave->rx_gain);
|
||||
if (slave->de_emphasis)
|
||||
de_emphasis(&slave->estate, slave_samples, count);
|
||||
if (slave->wave_rx_play.fp)
|
||||
wave_read(&slave->wave_rx_play, slave_samples, count);
|
||||
if (slave->loopback != 1) {
|
||||
if (slave->wave_rx_rec.fp)
|
||||
wave_write(&slave->wave_rx_rec, slave_samples, count);
|
||||
display_wave(slave, slave_samples, count);
|
||||
sender_receive(slave, slave_samples, count);
|
||||
/* loop through all channels */
|
||||
for (i = 0, inst = sender; inst; i++, inst = inst->slave) {
|
||||
/* rx gain */
|
||||
if (inst->rx_gain != 1.0)
|
||||
gain_samples(samples[i], count, inst->rx_gain);
|
||||
/* do de emphasis from radio (then write_wave/wave_read), receive audio, process echo test */
|
||||
if (inst->de_emphasis)
|
||||
de_emphasis(&inst->estate, samples[i], count);
|
||||
if (inst->wave_rx_play.fp)
|
||||
wave_read(&inst->wave_rx_play, samples[i], count);
|
||||
if (inst->loopback != 1) {
|
||||
if (inst->wave_rx_rec.fp)
|
||||
wave_write(&inst->wave_rx_rec, samples[i], count);
|
||||
display_wave(inst, samples[i], count);
|
||||
sender_receive(inst, samples[i], count);
|
||||
}
|
||||
if (slave->loopback == 3)
|
||||
jitter_save(&slave->audio, slave_samples, count);
|
||||
if (inst->loopback == 3)
|
||||
jitter_save(&inst->audio, samples[i], count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,8 +20,8 @@ enum pilot_signal {
|
||||
/* common structure of each transmitter */
|
||||
typedef struct sender {
|
||||
struct sender *next;
|
||||
struct sender *slave; /* points to audio device slave member */
|
||||
struct sender *master; /* points to audio device master source */
|
||||
struct sender *slave; /* points to 'slave' that uses next channel of audio device */
|
||||
struct sender *master; /* if set, the audio device is owned by 'master' */
|
||||
|
||||
/* system info */
|
||||
int kanal; /* channel number */
|
||||
@@ -30,7 +30,6 @@ typedef struct sender {
|
||||
void *sound;
|
||||
char sounddev[64]; /* sound device name */
|
||||
int samplerate;
|
||||
int cross_channels; /* swap right and left on IO */
|
||||
samplerate_t srstate; /* sample rate conversion state */
|
||||
double rx_gain; /* factor of level to apply on rx samples */
|
||||
int pre_emphasis; /* use pre_emhasis, done by sender */
|
||||
@@ -70,7 +69,7 @@ typedef struct sender {
|
||||
extern sender_t *sender_head;
|
||||
extern int cant_recover;
|
||||
|
||||
int sender_create(sender_t *sender, int kanal, const char *sounddev, int samplerate, int cross_channels, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, int loopback, double loss_volume, enum pilot_signal pilot_signal);
|
||||
int sender_create(sender_t *sender, int kanal, const char *sounddev, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, int loopback, double loss_volume, enum pilot_signal pilot_signal);
|
||||
void sender_destroy(sender_t *sender);
|
||||
void process_sender_audio(sender_t *sender, int *quit, int latspl);
|
||||
void sender_send(sender_t *sender, int16_t *samples, int count);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
|
||||
void *sound_open(const char *device, int samplerate);
|
||||
void sound_close(void *inst);
|
||||
int sound_write(void *inst, int16_t *samples_left, int16_t *samples_right, int num);
|
||||
int sound_read(void *inst, int16_t *samples_left, int16_t *samples_right, int num);
|
||||
int sound_write(void *inst, int16_t **samples, int num, int channels);
|
||||
int sound_read(void *inst, int16_t **samples, int num, int channels);
|
||||
int sound_get_inbuffer(void *inst);
|
||||
int sound_is_stereo_capture(void *inst);
|
||||
int sound_is_stereo_playback(void *inst);
|
||||
|
@@ -187,24 +187,29 @@ void sound_close(void *inst)
|
||||
free(sound);
|
||||
}
|
||||
|
||||
int sound_write(void *inst, int16_t *samples_left, int16_t *samples_right, int num)
|
||||
int sound_write(void *inst, int16_t **samples, int num, int channels)
|
||||
{
|
||||
sound_t *sound = (sound_t *)inst;
|
||||
int16_t buff[num << 1], *samples;
|
||||
int16_t buff[num << 1];
|
||||
int rc;
|
||||
int i, ii;
|
||||
|
||||
if (sound->pchannels == 2) {
|
||||
|
||||
for (i = 0, ii = 0; i < num; i++) {
|
||||
buff[ii++] = *samples_right++;
|
||||
buff[ii++] = *samples_left++;
|
||||
if (channels < 2) {
|
||||
for (i = 0, ii = 0; i < num; i++) {
|
||||
buff[ii++] = samples[0][i];
|
||||
buff[ii++] = samples[0][i];
|
||||
}
|
||||
} else {
|
||||
for (i = 0, ii = 0; i < num; i++) {
|
||||
buff[ii++] = samples[0][i];
|
||||
buff[ii++] = samples[1][i];
|
||||
}
|
||||
}
|
||||
samples = buff;
|
||||
rc = snd_pcm_writei(sound->phandle, buff, num);
|
||||
} else
|
||||
samples = samples_left;
|
||||
rc = snd_pcm_writei(sound->phandle, samples[0], num);
|
||||
|
||||
rc = snd_pcm_writei(sound->phandle, samples, num);
|
||||
if (rc < 0) {
|
||||
PDEBUG(DSOUND, DEBUG_ERROR, "failed to write audio to interface (%s)\n", snd_strerror(rc));
|
||||
if (rc == -EPIPE)
|
||||
@@ -220,10 +225,11 @@ int sound_write(void *inst, int16_t *samples_left, int16_t *samples_right, int n
|
||||
|
||||
#define KEEP_FRAMES 8 /* minimum frames not to read, due to bug in ALSA */
|
||||
|
||||
int sound_read(void *inst, int16_t *samples_left, int16_t *samples_right, int num)
|
||||
int sound_read(void *inst, int16_t **samples, int num, int channels)
|
||||
{
|
||||
sound_t *sound = (sound_t *)inst;
|
||||
int16_t buff[num << 1];
|
||||
int32_t spl;
|
||||
int in, rc;
|
||||
int i, ii;
|
||||
|
||||
@@ -241,7 +247,7 @@ int sound_read(void *inst, int16_t *samples_left, int16_t *samples_right, int nu
|
||||
if (sound->cchannels == 2)
|
||||
rc = snd_pcm_readi(sound->chandle, buff, in);
|
||||
else
|
||||
rc = snd_pcm_readi(sound->chandle, samples_left, in);
|
||||
rc = snd_pcm_readi(sound->chandle, samples[0], in);
|
||||
|
||||
if (rc < 0) {
|
||||
if (errno == EAGAIN)
|
||||
@@ -254,12 +260,23 @@ int sound_read(void *inst, int16_t *samples_left, int16_t *samples_right, int nu
|
||||
}
|
||||
|
||||
if (sound->cchannels == 2) {
|
||||
for (i = 0, ii = 0; i < rc; i++) {
|
||||
*samples_right++ = buff[ii++];
|
||||
*samples_left++ = buff[ii++];
|
||||
if (channels < 2) {
|
||||
for (i = 0, ii = 0; i < rc; i++) {
|
||||
spl = buff[ii++];
|
||||
spl += buff[ii++];
|
||||
if (spl > 32767)
|
||||
spl = 32767;
|
||||
else if (spl < -32768)
|
||||
spl = -32768;
|
||||
samples[0][i] = spl;
|
||||
}
|
||||
} else {
|
||||
for (i = 0, ii = 0; i < rc; i++) {
|
||||
samples[0][i] = buff[ii++];
|
||||
samples[1][i] = buff[ii++];
|
||||
}
|
||||
}
|
||||
} else
|
||||
memcpy(samples_right, samples_left, num << 1);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user