Changeset 63d6ff9 in mainline
- Timestamp:
- 2012-07-13T04:52:05Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f3fced0
- Parents:
- d93a5a6f
- Location:
- uspace/srv/audio/hound
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/audio_source.c
rd93a5a6f r63d6ff9 71 71 void audio_source_fini(audio_source_t *source) 72 72 { 73 if (!source) 74 return; 73 assert(source); 75 74 assert(source->connected_sink == NULL); 76 75 free(source->name); 77 free(source);76 source->name = NULL; 78 77 } 79 78 -
uspace/srv/audio/hound/hound.c
rd93a5a6f r63d6ff9 55 55 audio_ ## type ## _list_instance(it); \ 56 56 if (str_cmp(name, dev->name) == 0) { \ 57 log_debug("%s with name %sis already present", \57 log_debug("%s with name '%s' is already present", \ 58 58 #type, name); \ 59 return NULL; \59 return dev; \ 60 60 } \ 61 61 } \ -
uspace/srv/audio/hound/main.c
rd93a5a6f r63d6ff9 68 68 size_t size = 0; 69 69 ipc_callid_t callid; 70 async_data_ read_receive(&callid, &size);70 async_data_write_receive(&callid, &size); 71 71 char *buffer = malloc(size); 72 72 if (buffer) { 73 async_data_ read_finalize(callid, buffer, size);73 async_data_write_finalize(callid, buffer, size); 74 74 buffer[size - 1] = 0; 75 75 log_verbose("Got name from client: %s", buffer); … … 83 83 async_sess_t *s = async_callback_receive_start(EXCHANGE_ATOMIC, &call); 84 84 async_answer_0(callid, s ? EOK : ENOMEM); 85 log_verbose("Received callback session"); 85 if (s) { 86 log_verbose("Received callback session"); 87 } else 88 log_debug("Failed to receive callback session"); 86 89 return s; 87 90 } … … 148 151 const char *name = get_name(); 149 152 async_sess_t *sess = get_session(); 150 audio_client_t * 153 audio_client_t *client = 151 154 audio_client_get_playback(name, &format, sess); 155 free(name); 152 156 if (!client) { 153 157 log_error("Failed to create playback client"); 154 158 async_answer_0(callid, ENOMEM); 159 break; 155 160 } 156 161 int ret = hound_add_source(&hound, &client->source); … … 162 167 break; 163 168 } 169 log_info("Added audio client %p '%s'", 170 client, client->name); 164 171 async_answer_0(callid, EOK); 165 172 list_append(&client->link, &local_playback);
Note:
See TracChangeset
for help on using the changeset viewer.