Ignore:
Timestamp:
2013-03-16T23:46:59Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
abaef81
Parents:
6b0cfa1
Message:

libhound: Add new client side API skeleton

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/hound/include/hound/client.h

    r6b0cfa1 r89d3946f  
    4444#define DEFAULT_SOURCE "default"
    4545
     46typedef struct hound_context hound_context_t;
     47typedef struct hound_stream hound_stream_t;
     48
     49hound_context_t * hound_context_create_playback(const char *name,
     50    unsigned channels, unsigned rate, pcm_sample_format_t format, size_t bsize);
     51hound_context_t * hound_context_create_capture(const char *name,
     52    unsigned channels, unsigned rate, pcm_sample_format_t format, size_t bsize);
     53void hound_context_destroy(hound_context_t *hound);
     54
     55int hound_context_enable(hound_context_t *hound);
     56int hound_context_disable(hound_context_t *hound);
     57
     58int hound_context_set_main_stream_format(hound_context_t *hound,
     59    unsigned channels, unsigned rate, pcm_sample_format_t format);
     60int hound_get_output_targets(const char **names, size_t *count);
     61int hound_get_input_targets(const char **names, size_t *count);
     62
     63int hound_context_connect_target(hound_context_t *hound, const char* target);
     64int hound_context_disconnect_target(hound_context_t *hound, const char* target);
     65
     66int hound_write_main_stream(hound_context_t *hound,
     67    const void *data, size_t size);
     68int hound_read_main_stream(hound_context_t *hound, void *data, size_t size);
     69int hound_write_replace_main_stream(hound_context_t *hound,
     70    const void *data, size_t size);
     71int hound_write_immediate_stream(hound_context_t *hound,
     72    const void *data, size_t size);
     73
     74hound_stream_t *hound_stream_create(hound_context_t *hound, unsigned flags,
     75    unsigned channels, unsigned rate, pcm_sample_format_t format);
     76void hound_stream_destroy(hound_stream_t *stream);
     77
     78int hound_stream_write(hound_stream_t *stream, const void *data, size_t size);
     79int hound_stream_read(hound_stream_t *stream, void *data, size_t size);
     80
     81
     82
     83
     84
    4685typedef async_sess_t hound_sess_t;
    4786
Note: See TracChangeset for help on using the changeset viewer.