Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
aubuf: exclude non compatible CXX functions (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers authored Oct 3, 2022
1 parent ebe53fd commit b5876ac
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions include/rem_aubuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ int aubuf_debug(struct re_printf *pf, const struct aubuf *ab);
size_t aubuf_cur_size(const struct aubuf *ab);
void aubuf_drop_auframe(struct aubuf *ab, const struct auframe *af);


static inline int aubuf_append(struct aubuf *ab, struct mbuf *mb)
{
return aubuf_append_auframe(ab, mb, NULL);
}


static inline int aubuf_get_samp(struct aubuf *ab, uint32_t ptime,
int16_t *sampv, size_t sampc)
{
return aubuf_get(ab, ptime, (uint8_t *)sampv, sampc * 2);
}


#ifndef __cplusplus
static inline int aubuf_write(struct aubuf *ab, const uint8_t *p, size_t sz)
{
struct auframe af = {
Expand All @@ -40,12 +55,6 @@ static inline int aubuf_write(struct aubuf *ab, const uint8_t *p, size_t sz)
}


static inline int aubuf_append(struct aubuf *ab, struct mbuf *mb)
{
return aubuf_append_auframe(ab, mb, NULL);
}


static inline int aubuf_write_samp(struct aubuf *ab, const int16_t *sampv,
size_t sampc)
{
Expand Down Expand Up @@ -91,10 +100,4 @@ static inline void aubuf_read_samp(struct aubuf *ab, int16_t *sampv,

aubuf_read_auframe(ab, &af);
}


static inline int aubuf_get_samp(struct aubuf *ab, uint32_t ptime,
int16_t *sampv, size_t sampc)
{
return aubuf_get(ab, ptime, (uint8_t *)sampv, sampc * 2);
}
#endif

0 comments on commit b5876ac

Please sign in to comment.