Skip to content

Commit 147c55c

Browse files
committed
stream: +is_corked, +is_suspended
1 parent 7f13d8e commit 147c55c

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

src/apulse-stream.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,23 @@ pa_stream_get_timing_info(pa_stream *s)
374374
return &s->timing_info;
375375
}
376376

377+
APULSE_EXPORT
378+
int
379+
pa_stream_is_corked(pa_stream *s)
380+
{
381+
trace_info("F %s s=%p\n", __func__, s);
382+
return g_atomic_int_get(&s->paused);
383+
}
384+
385+
APULSE_EXPORT
386+
int
387+
pa_stream_is_suspended(pa_stream *s)
388+
{
389+
trace_info("F %s s=%p\n", __func__, s);
390+
// ALSA sink is never suspended
391+
return 0;
392+
}
393+
377394
APULSE_EXPORT
378395
pa_stream *
379396
pa_stream_new(pa_context *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map)

src/notimplemented.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -815,20 +815,6 @@ const char *pa_stream_get_device_name(pa_stream *s)
815815
return NULL;
816816
}
817817

818-
APULSE_EXPORT
819-
int pa_stream_is_suspended(pa_stream *s)
820-
{
821-
trace_info("Z %s\n", __func__);
822-
return 0;
823-
}
824-
825-
APULSE_EXPORT
826-
int pa_stream_is_corked(pa_stream *s)
827-
{
828-
trace_info("Z %s\n", __func__);
829-
return 0;
830-
}
831-
832818
APULSE_EXPORT
833819
int pa_stream_begin_write(pa_stream *p, void **data, size_t *nbytes)
834820
{

0 commit comments

Comments
 (0)