Changeset 5f97ef44 in mainline for uspace/app/wavplay


Ignore:
Timestamp:
2018-07-13T14:10:15Z (8 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e3787a0
Parents:
9912f49
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-13 14:08:57)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-13 14:10:15)
Message:

Sleep is more natural as part of the fibril API.
(the implementation will move later)

Location:
uspace/app/wavplay
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/wavplay/dplay.c

    r9912f49 r5f97ef44  
    312312                    pos, usecs, real_delay, to_play);
    313313                if (real_delay)
    314                         async_usleep(real_delay);
     314                        fibril_usleep(real_delay);
    315315                /* update buffer position */
    316316                const errno_t ret = audio_pcm_get_buffer_pos(pb->device, &pos);
  • uspace/app/wavplay/drec.c

    r9912f49 r5f97ef44  
    167167        /* XXX Control returns even before we can be sure callbacks finished */
    168168        printf("Delay before playback termination\n");
    169         async_usleep(1000000);
     169        fibril_usleep(1000000);
    170170        printf("Terminate playback\n");
    171171}
  • uspace/app/wavplay/main.c

    r9912f49 r5f97ef44  
    341341        /* Wait for all fibrils to finish */
    342342        while (atomic_get(&playcount) > 0)
    343                 async_usleep(1000000);
     343                fibril_usleep(1000000);
    344344
    345345        /* Destroy parallel playback context, if initialized */
Note: See TracChangeset for help on using the changeset viewer.