Changeset 6424800 in mainline for uspace/srv/audio/hound/main.c
- Timestamp:
- 2012-07-13T08:38:20Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ab07cf0
- Parents:
- 1c33539
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/main.c
r1c33539 r6424800 178 178 audio_client_t * client = 179 179 audio_client_get_recording(name, &format, sess); 180 free(name); 180 181 if (!client) { 181 182 log_error("Failed to create recording client"); … … 196 197 } 197 198 case HOUND_UNREGISTER_PLAYBACK: { 198 //const char *name = get_name(); 199 //TODO unregister in hound 200 //TODO remove from local 199 const char *name = get_name(); 200 int ret = ENOENT; 201 list_foreach(local_playback, it) { 202 audio_client_t *client = 203 audio_client_list_instance(it); 204 if (str_cmp(client->name, name) == 0) { 205 ret = hound_remove_source(&hound, 206 &client->source); 207 if (ret == EOK) { 208 list_remove(&client->link); 209 audio_client_destroy(client); 210 } 211 break; 212 } 213 } 214 free(name); 215 async_answer_0(callid, ret); 201 216 break; 202 217 } 203 218 case HOUND_UNREGISTER_RECORDING: { 204 //TODO Get Name 205 //TODO unregister in hound 206 //TODO remove from local 219 const char *name = get_name(); 220 int ret = ENOENT; 221 list_foreach(local_recording, it) { 222 audio_client_t *client = 223 audio_client_list_instance(it); 224 if (str_cmp(client->name, name) == 0) { 225 ret = hound_remove_sink(&hound, 226 &client->sink); 227 if (ret == EOK) { 228 list_remove(&client->link); 229 audio_client_destroy(client); 230 } 231 break; 232 } 233 } 234 free(name); 235 async_answer_0(callid, ret); 207 236 break; 208 237 } … … 237 266 break; 238 267 case 0: 268 while(!list_empty(&local_recording)) { 269 audio_client_t *client = 270 audio_client_list_instance( 271 list_first(&local_recording)); 272 list_remove(&client->link); 273 hound_remove_sink(&hound, &client->sink); 274 audio_client_destroy(client); 275 } 276 while(!list_empty(&local_playback)) { 277 audio_client_t *client = 278 audio_client_list_instance( 279 list_first(&local_playback)); 280 list_remove(&client->link); 281 hound_remove_source(&hound, &client->source); 282 audio_client_destroy(client); 283 } 239 284 //TODO remove all clients 240 285 return;
Note:
See TracChangeset
for help on using the changeset viewer.