Changeset fd5c0b7 in mainline
- Timestamp:
- 2012-07-13T07:24:07Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1c33539
- Parents:
- 9b2ac3d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/audio_device.c
r9b2ac3d rfd5c0b7 183 183 ipc_callid_t callid = async_get_call(&call); 184 184 async_answer_0(callid, EOK); 185 if (IPC_GET_IMETHOD(call) != IPC_FIRST_USER_METHOD) { 186 log_debug("Unknown event.\n"); 187 continue; 188 } 189 // Assume playback for now 190 if (dev->buffer.position) { 191 dev->buffer.position += dev->buffer.size / BUFFER_BLOCKS; 192 } 193 if (!dev->buffer.position || 194 dev->buffer.position >= dev->buffer.base + dev->buffer.size) 195 { 196 dev->buffer.position = dev->buffer.base; 197 } 198 audio_sink_mix_inputs( 199 &dev->sink, dev->buffer.base, 200 dev->buffer.size / BUFFER_BLOCKS); 185 switch(IPC_GET_IMETHOD(call)) { 186 case PCM_EVENT_PLAYBACK_DONE: { 187 if (dev->buffer.position) { 188 dev->buffer.position += 189 dev->buffer.size / BUFFER_BLOCKS; 190 } 191 if (!dev->buffer.position || 192 dev->buffer.position >= 193 dev->buffer.base + dev->buffer.size) 194 { 195 dev->buffer.position = dev->buffer.base; 196 } 197 audio_sink_mix_inputs(&dev->sink, dev->buffer.position, 198 dev->buffer.size / BUFFER_BLOCKS); 199 break; 200 } 201 case PCM_EVENT_PLAYBACK_TERMINATED: { 202 log_verbose("Playback terminated!"); 203 return; 204 break; 205 } 206 case PCM_EVENT_RECORDING_DONE: { 207 break; 208 } 209 case PCM_EVENT_RECORDING_TERMINATED: 210 log_verbose("Recording terminated!"); 211 break; 212 } 201 213 202 214 }
Note:
See TracChangeset
for help on using the changeset viewer.