Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
stsaz committed Sep 21, 2024
1 parent e3dd44e commit 94adc9f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/afilter/skip.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct pcm_skip {
uint ignore_delay;
};

static int audio_skip(struct pcm_skip *c, phi_track *t, ffstr *buf, uint64 skip)
static int audio_skip(const struct pcm_skip *c, const phi_track *t, ffstr *buf, uint64 skip)
{
uint64 bytes = skip * c->sample_size;
buf->len -= bytes;
Expand Down
7 changes: 4 additions & 3 deletions src/format/ogg-read.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static uint file_bitrate(phi_track *t, oggread *og, uint sample_rate)
. p1.x -> vorbis-tags
. px.x -> vorbis-data
*/
static int ogg_decode(void *ctx, phi_track *t)
static int ogg_read(void *ctx, phi_track *t)
{
enum { I_HDR, I_INFO, I_DATA, };
struct ogg_r *o = ctx;
Expand Down Expand Up @@ -137,7 +137,8 @@ static int ogg_decode(void *ctx, phi_track *t)
case OGGREAD_DATA:
if (o->state == I_HDR) {
o->state = I_INFO;
t->audio.total = oggread_info(&o->og)->total_samples;
const struct oggread_info *i = oggread_info(&o->og);
t->audio.total = (i->total_samples) ? i->total_samples : ~0ULL;
if (0 != add_decoder(o, t, t->data_out))
return PHI_ERR;
}
Expand Down Expand Up @@ -181,6 +182,6 @@ static int ogg_decode(void *ctx, phi_track *t)
}

const phi_filter phi_ogg_read = {
ogg_open, ogg_close, ogg_decode,
ogg_open, ogg_close, ogg_read,
"ogg-read"
};
2 changes: 1 addition & 1 deletion src/tui/play.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static void tui_info(tui_track *u)
, mod->color.filename, t->conf.ifile.name, mod->color.reset
, (double)tsize / (1024 * 1024)
, tmsec / 60, tmsec % 60, (uint)(total_time % 1000)
, u->total_samples
, (u->total_samples != ~0ULL) ? u->total_samples : 0ULL
, (t->audio.bitrate + 500) / 1000
, t->audio.decoder
, phi_af_name(fmt->format)
Expand Down
15 changes: 14 additions & 1 deletion xbuild-debianbullseye.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ EOF
bash -c 'cd /src/phiola && source ./build_linux.sh'
fi

if ! podman container top $CONTAINER_NAME ; then
cat >build_linux.sh <<EOF
sleep 600
EOF
# Start container in background
podman start --attach $CONTAINER_NAME &
sleep .5
while ! podman container top $CONTAINER_NAME ; do
sleep .5
done
fi

# Prepare build script
# Note that openssl-3 must be built from source.
cat >build_linux.sh <<EOF
Expand Down Expand Up @@ -83,4 +95,5 @@ make -j8 \
EOF

# Build inside the container
podman start --attach $CONTAINER_NAME
podman exec $CONTAINER_NAME \
bash -c 'cd /src/phiola && source ./build_linux.sh'

0 comments on commit 94adc9f

Please sign in to comment.