Changeset ab07cf0 in mainline for uspace/srv/audio/hound/audio_source.c
- Timestamp:
- 2012-07-13T16:11:05Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 13df13c8
- Parents:
- 6424800
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/audio_source.c
r6424800 rab07cf0 64 64 source->format = *f; 65 65 source->available_data.base = NULL; 66 source->available_data.position = NULL; 66 67 source->available_data.size = 0; 67 68 log_verbose("Initialized source (%p) '%s'", source, source->name); … … 119 120 return ENOTSUP; 120 121 } 121 if (source->available_data. base== NULL ||122 if (source->available_data.position == NULL || 122 123 source->available_data.size == 0) { 123 124 int ret = EOVERFLOW; /* In fact this is underflow... */ … … 125 126 ret = source->update_available_data(source, size); 126 127 if (ret != EOK) { 127 log_debug("No data to add ");128 log_debug("No data to add to %p(%zu)", buffer, size); 128 129 return ret; 129 130 } … … 132 133 const size_t real_size = min(size, source->available_data.size); 133 134 const int ret = 134 audio_format_mix(buffer, source->available_data. base, real_size, f);135 audio_format_mix(buffer, source->available_data.position, real_size, f); 135 136 if (ret != EOK) { 136 log_debug("Mixing failed"); 137 log_debug("Mixing failed %p <= %p, %zu", 138 buffer, source->available_data.position, real_size); 137 139 return ret; 138 140 } 139 source->available_data.base += real_size; 141 142 source->available_data.position += real_size; 140 143 source->available_data.size -= real_size; 144 145 log_verbose("Mixing successful %p <= %p, %zu", 146 buffer, source->available_data.position, real_size); 147 141 148 buffer += real_size; 142 149 size -= real_size;
Note:
See TracChangeset
for help on using the changeset viewer.