Changeset ec81221 in mainline
- Timestamp:
- 2013-03-24T14:09:11Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2ba4d45
- Parents:
- 7294b5b
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/wavplay/main.c
r7294b5b rec81221 81 81 } 82 82 83 ret = hound_context_connect_target(hound, "default");83 ret = hound_context_connect_target(hound, HOUND_DEFAULT_TARGET); 84 84 if (ret != EOK) { 85 85 printf("Failed to connect to default target: %s\n", -
uspace/lib/hound/include/hound/client.h
r7294b5b rec81221 41 41 #include <pcm/format.h> 42 42 43 #define DEFAULT_SINK "default" 44 #define DEFAULT_SOURCE "default" 43 #define HOUND_DEFAULT_TARGET "default" 44 #define HOUND_ALL_TARGETS "all" 45 #define DEFAULT_SINK "default" //DEPRECATED 45 46 46 47 typedef struct hound_context hound_context_t; -
uspace/lib/hound/src/client.c
r7294b5b rec81221 160 160 { 161 161 assert(hound); 162 if (hound->record) 163 return hound_service_connect_source_sink( 162 assert(target); 163 164 const char **tgt = NULL; 165 size_t count = 1; 166 int ret = EOK; 167 if (str_cmp(target, HOUND_DEFAULT_TARGET) == 0) { 168 ret = hound_context_get_available_targets(hound, &tgt, &count); 169 if (ret != EOK) 170 return ret; 171 target = tgt[0]; 172 } 173 //TODO handle all-targets 174 175 if (hound->record) { 176 ret = hound_service_connect_source_sink( 164 177 hound->session, target, hound->name); 165 else166 ret urnhound_service_connect_source_sink(178 } else { 179 ret = hound_service_connect_source_sink( 167 180 hound->session, hound->name, target); 181 } 182 if (tgt) 183 free(tgt[0]); 184 free(tgt); 185 return ret; 168 186 } 169 187 … … 171 189 { 172 190 assert(hound); 173 if (hound->record) 191 assert(target); 192 if (hound->record) { 174 193 return hound_service_disconnect_source_sink( 175 194 hound->session, target, hound->name); 176 else195 } else { 177 196 return hound_service_disconnect_source_sink( 178 197 hound->session, hound->name, target); 198 } 179 199 } 180 200
Note:
See TracChangeset
for help on using the changeset viewer.