Skip to content

Commit

Permalink
stream: +is_corked, +is_suspended
Browse files Browse the repository at this point in the history
  • Loading branch information
i-rinat committed May 25, 2015
1 parent 7f13d8e commit 147c55c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
17 changes: 17 additions & 0 deletions src/apulse-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,23 @@ pa_stream_get_timing_info(pa_stream *s)
return &s->timing_info;
}

APULSE_EXPORT
int
pa_stream_is_corked(pa_stream *s)
{
trace_info("F %s s=%p\n", __func__, s);
return g_atomic_int_get(&s->paused);
}

APULSE_EXPORT
int
pa_stream_is_suspended(pa_stream *s)
{
trace_info("F %s s=%p\n", __func__, s);
// ALSA sink is never suspended
return 0;
}

APULSE_EXPORT
pa_stream *
pa_stream_new(pa_context *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map)
Expand Down
14 changes: 0 additions & 14 deletions src/notimplemented.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,20 +815,6 @@ const char *pa_stream_get_device_name(pa_stream *s)
return NULL;
}

APULSE_EXPORT
int pa_stream_is_suspended(pa_stream *s)
{
trace_info("Z %s\n", __func__);
return 0;
}

APULSE_EXPORT
int pa_stream_is_corked(pa_stream *s)
{
trace_info("Z %s\n", __func__);
return 0;
}

APULSE_EXPORT
int pa_stream_begin_write(pa_stream *p, void **data, size_t *nbytes)
{
Expand Down

0 comments on commit 147c55c

Please sign in to comment.