Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
stsaz committed Sep 28, 2024
1 parent 16cd4d7 commit d0648dd
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

import androidx.core.app.ActivityCompat;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;

class Explorer {
private static final String TAG = "phiola.Explorer";
private final Core core;
Expand Down
6 changes: 4 additions & 2 deletions src/acodec/alib3-bridge/opus-dec-if.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ int ffopus_decode(ffopus *o, ffstr *input, ffstr *output, uint64 *pos)

float *pcm = (void*)o->pcmbuf.ptr;
r = opus_decode_f(o->dec, input->ptr, input->len, pcm);
if (r < 0)
return ERR(o, r);
if (r < 0) {
o->err = r;
return FFOPUS_RWARN;
}
input->len = 0;

ffstr_set(output, pcm, r * o->info.channels * sizeof(float));
Expand Down
4 changes: 3 additions & 1 deletion src/afilter/soxr-conv.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ static int soxr_conv(void *ctx, phi_track *t)
if (0 != (val = ffsoxr_create(&c->soxr, &inpcm, &outpcm))
|| (core->conf.log_level >= PHI_LOG_DEBUG)) {
log_pcmconv(val, &inpcm, &outpcm, t);
if (val != 0)
if (val != 0) {
t->error = PHI_E_ACONV;
return PHI_ERR;
}
}

c->state = 3;
Expand Down
7 changes: 4 additions & 3 deletions src/core/track.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ static int trk_filter_add(phi_track *t, const phi_filter *iface, uint pos)
t->conveyor.n_active++;

char buf[200];
dbglog(t, "%s: added to chain [%s]"
, f->iface->name, conveyor_print(v, f, buf, sizeof(buf)));
dbglog(t, "%s: added to chain [%u/%u] {%s}"
, f->iface->name, t->conveyor.n_active, v->i_fpool
, conveyor_print(v, f, buf, sizeof(buf)));
return pos;
}

Expand Down Expand Up @@ -358,7 +359,7 @@ static int trk_filter_handle_result(phi_track *t, struct filter *f, int r)

if (chain_modified) {
char buf[200];
dbglog(t, "chain (%u): [%s]"
dbglog(t, "chain [%u] {%s}"
, t->conveyor.n_active, conveyor_print(&t->conveyor, NULL, buf, sizeof(buf)));
}

Expand Down
2 changes: 1 addition & 1 deletion src/format/ogg-write.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static void* ogg_w_open(phi_track *t)
seed = 1;
fftime t;
fftime_now(&t);
ffrand_seed(fftime_sec(&t));
ffrand_seed(fftime_sec(&t) + fftime_nsec(&t));
}

return o;
Expand Down
2 changes: 2 additions & 0 deletions src/jni/convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ static const char* trk_errstr(uint e)
return fferr_strptr(e & ~PHI_E_SYS);

e--;
// enum PHI_E
static const char errstr[][30] = {
"Input file doesn't exist", // PHI_E_NOSRC
"Output file already exists", // PHI_E_DSTEXIST
"Unknown input file format", // PHI_E_UNKIFMT
"Input audio device problem", // PHI_E_AUDIO_INPUT
"Cancelled", // PHI_E_CANCELLED
"Sample conversion", // PHI_E_ACONV
};
const char *s = "Unknown";
if (e < FF_COUNT(errstr))
Expand Down
1 change: 0 additions & 1 deletion src/net/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ static void net_close()
#ifndef PHI_HTTP_NO_SSL
nml_ssl_uninit(phi_ssl_ctx);
if (phi_ssl_ctx) {
ffmem_free(phi_ssl_ctx->ctx_conf->cert_file);
ffmem_free(phi_ssl_ctx->ctx_conf);
ffmem_free(phi_ssl_ctx);
}
Expand Down
1 change: 1 addition & 0 deletions src/track.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ enum PHI_E {
PHI_E_UNKIFMT, // unknown input format
PHI_E_AUDIO_INPUT,
PHI_E_CANCELLED,
PHI_E_ACONV, // audio conversion
PHI_E_OTHER = 255,
PHI_E_SYS = 0x80000000,
};
Expand Down

0 comments on commit d0648dd

Please sign in to comment.