Ignore:
Timestamp:
2012-07-17T08:26:49Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e6bba8f
Parents:
950110ee
Message:

Create libpcm.

Move pcm related functions and definitions there.
Make other stuff use this library.
Rename most of it on the way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/audio/hound/audio_source.c

    r950110ee rea6c838  
    4949    int (*connection_change)(audio_source_t *),
    5050    int (*update_available_data)(audio_source_t *, size_t),
    51     const audio_format_t *f)
     51    const pcm_format_t *f)
    5252{
    5353        assert(source);
     
    8282        assert(source);
    8383        audio_sink_t *old_sink = source->connected_sink;
    84         const audio_format_t old_format = source->format;
     84        const pcm_format_t old_format = source->format;
    8585
    8686        source->connected_sink = sink;
    87         if (audio_format_is_any(&source->format)) {
     87        if (pcm_format_is_any(&source->format)) {
    8888                assert(sink);
    89                 assert(!audio_format_is_any(&sink->format));
     89                assert(!pcm_format_is_any(&sink->format));
    9090                source->format = sink->format;
    9191        }
     
    102102
    103103int audio_source_add_self(audio_source_t *source, void *buffer, size_t size,
    104     const audio_format_t *f)
     104    const pcm_format_t *f)
    105105{
    106106        assert(source);
     
    120120                return ENOTSUP;
    121121        }
    122         const size_t src_frame_size = audio_format_frame_size(&source->format);
    123         const size_t dst_frames = size / audio_format_frame_size(f);
     122        const size_t src_frame_size = pcm_format_frame_size(&source->format);
     123        const size_t dst_frames = size / pcm_format_frame_size(f);
    124124
    125125        if (source->available_data.position == NULL ||
     
    135135        }
    136136
    137         const int ret = audio_format_convert_and_mix(buffer, size,
     137        const int ret = pcm_format_convert_and_mix(buffer, size,
    138138               source->available_data.position, source->available_data.size,
    139139               &source->format, f);
Note: See TracChangeset for help on using the changeset viewer.