Changeset 3bacee1 in mainline for uspace/app/wavplay


Ignore:
Timestamp:
2018-04-12T16:27:17Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3cf22f9
Parents:
76d0981d
git-author:
Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
Message:

Make ccheck-fix again and commit more good files.

Location:
uspace/app/wavplay
Files:
2 edited

Legend:

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

    r76d0981d r3bacee1  
    5858                void *base;
    5959                size_t size;
    60                 void* write_ptr;
     60                void *write_ptr;
    6161        } buffer;
    6262        pcm_format_t f;
    63         FILE* source;
     63        FILE *source;
    6464        volatile bool playing;
    6565        fibril_mutex_t mutex;
     
    104104                ipc_call_t call;
    105105                cap_call_handle_t chandle = async_get_call(&call);
    106                 switch(IPC_GET_IMETHOD(call)) {
     106                switch (IPC_GET_IMETHOD(call)) {
    107107                case PCM_EVENT_PLAYBACK_STARTED:
    108108                case PCM_EVENT_FRAMES_PLAYED:
     
    125125                }
    126126                const size_t bytes = fread(pb->buffer.write_ptr,
    127                    sizeof(uint8_t), fragment_size, pb->source);
     127                    sizeof(uint8_t), fragment_size, pb->source);
    128128                printf("Copied from position %p size %zu/%zu\n",
    129129                    pb->buffer.write_ptr, bytes, fragment_size);
     
    297297                        if (ret != EOK) {
    298298                                printf("Failed to update position indicator "
    299                                    "%s\n", str_error(ret));
     299                                    "%s\n", str_error(ret));
    300300                        }
    301301                }
     
    305305
    306306                /* Compute delay time */
    307                 const useconds_t real_delay = (usecs > work_time)
    308                     ? usecs - work_time : 0;
     307                const useconds_t real_delay = (usecs > work_time) ?
     308                    usecs - work_time : 0;
    309309                DPRINTF("POS %zu: %u usecs (%u) to play %zu bytes.\n",
    310310                    pos, usecs, real_delay, to_play);
     
    356356        }
    357357
    358         char* info = NULL;
     358        char *info = NULL;
    359359        ret = audio_pcm_get_info_str(session, &info);
    360360        if (ret != EOK) {
  • uspace/app/wavplay/drec.c

    r76d0981d r3bacee1  
    6363                size_t size;
    6464                unsigned id;
    65                 void* position;
     65                void *position;
    6666        } buffer;
    67         FILE* file;
     67        FILE *file;
    6868        audio_pcm_sess_t *device;
    6969} record_t;
     
    104104                ipc_call_t call;
    105105                cap_call_handle_t chandle = async_get_call(&call);
    106                 switch(IPC_GET_IMETHOD(call)) {
     106                switch (IPC_GET_IMETHOD(call)) {
    107107                case PCM_EVENT_CAPTURE_TERMINATED:
    108108                        printf("Recording terminated\n");
     
    125125                /* Write directly from device buffer to file */
    126126                const size_t bytes = fwrite(rec->buffer.position,
    127                    sizeof(uint8_t), buffer_part, rec->file);
     127                    sizeof(uint8_t), buffer_part, rec->file);
    128128                printf("%zu ", bytes);
    129129                rec->buffer.position += buffer_part;
     
    154154            pcm_sample_format_str(f.sample_format), f.channels);
    155155        const unsigned frames =
    156                 pcm_format_size_to_frames(rec->buffer.size / BUFFER_PARTS, &f);
     156            pcm_format_size_to_frames(rec->buffer.size / BUFFER_PARTS, &f);
    157157        ret = audio_pcm_start_capture_fragment(rec->device,
    158158            frames, f.channels, f.sampling_rate, f.sample_format);
     
    199199        }
    200200
    201         char* info = NULL;
     201        char *info = NULL;
    202202        ret = audio_pcm_get_info_str(session, &info);
    203203        if (ret != EOK) {
Note: See TracChangeset for help on using the changeset viewer.