Changeset ea6c838 in mainline for uspace/srv/audio/hound/audio_source.c
- Timestamp:
- 2012-07-17T08:26:49Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e6bba8f
- Parents:
- 950110ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/audio_source.c
r950110ee rea6c838 49 49 int (*connection_change)(audio_source_t *), 50 50 int (*update_available_data)(audio_source_t *, size_t), 51 const audio_format_t *f)51 const pcm_format_t *f) 52 52 { 53 53 assert(source); … … 82 82 assert(source); 83 83 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; 85 85 86 86 source->connected_sink = sink; 87 if ( audio_format_is_any(&source->format)) {87 if (pcm_format_is_any(&source->format)) { 88 88 assert(sink); 89 assert(! audio_format_is_any(&sink->format));89 assert(!pcm_format_is_any(&sink->format)); 90 90 source->format = sink->format; 91 91 } … … 102 102 103 103 int 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) 105 105 { 106 106 assert(source); … … 120 120 return ENOTSUP; 121 121 } 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); 124 124 125 125 if (source->available_data.position == NULL || … … 135 135 } 136 136 137 const int ret = audio_format_convert_and_mix(buffer, size,137 const int ret = pcm_format_convert_and_mix(buffer, size, 138 138 source->available_data.position, source->available_data.size, 139 139 &source->format, f);
Note:
See TracChangeset
for help on using the changeset viewer.