Changeset d01e635 in mainline
- Timestamp:
- 2012-07-12T18:29:02Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1df3018a
- Parents:
- 1240bb9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/dplay/dplay.c
r1240bb9 rd01e635 112 112 const size_t bytes = fread(pb->buffer.position, sizeof(uint8_t), 113 113 buffer_part, pb->source); 114 if (bytes == 0) { 115 audio_pcm_stop_playback(pb->device, pb->buffer.id); 116 } 114 117 bzero(pb->buffer.position + bytes, buffer_part - bytes); 115 118 pb->buffer.position += buffer_part; … … 117 120 if (pb->buffer.position >= (pb->buffer.base + pb->buffer.size)) 118 121 pb->buffer.position = pb->buffer.base; 119 if (bytes == 0) {120 fibril_mutex_lock(&pb->mutex);121 pb->playing = false;122 fibril_condvar_signal(&pb->cv);123 fibril_mutex_unlock(&pb->mutex);124 }125 122 } 126 123 } … … 152 149 fibril_condvar_wait(&pb->cv, &pb->mutex)); 153 150 154 audio_pcm_stop_playback(pb->device, pb->buffer.id);155 for (pb->playing = true; pb->playing;156 fibril_condvar_wait(&pb->cv, &pb->mutex));157 151 fibril_mutex_unlock(&pb->mutex); 158 152 printf("\n");
Note:
See TracChangeset
for help on using the changeset viewer.