Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset b497018 in mainline for uspace/app/drec/drec.c


Ignore:
Timestamp:
2012-07-15T15:13:34Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial
Children:
2cc5c835
Parents:
44d1311
Message:

Drop id parameter from audio_pcm interface.

Independent buffer should have separate nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/drec/drec.c

    r44d1311 rb497018  
    7272        assert(exch);
    7373        assert(rec);
    74         rec->buffer.id = 0;
    7574        rec->buffer.base = NULL;
    7675        rec->buffer.size = 0;
     
    123122        printf("Recording: %dHz, %s, %d channel(s).\n",
    124123            sampling_rate, pcm_sample_format_str(format), channels);
    125         int ret = audio_pcm_start_record(rec->device, rec->buffer.id,
     124        int ret = audio_pcm_start_record(rec->device,
    126125            SUBBUFFERS, channels, sampling_rate, format);
    127126        if (ret != EOK) {
     
    132131        getchar();
    133132        printf("\n");
    134         audio_pcm_stop_record(rec->device, rec->buffer.id);
     133        audio_pcm_stop_record(rec->device);
    135134}
    136135
     
    186185
    187186        ret = audio_pcm_get_buffer(rec.device, &rec.buffer.base,
    188             &rec.buffer.size, &rec.buffer.id, device_event_callback, &rec);
     187            &rec.buffer.size, device_event_callback, &rec);
    189188        if (ret != EOK) {
    190189                printf("Failed to get PCM buffer: %s.\n", str_error(ret));
    191190                goto close_session;
    192191        }
    193         printf("Buffer (%u): %p %zu.\n", rec.buffer.id, rec.buffer.base,
    194             rec.buffer.size);
     192        printf("Buffer: %p %zu.\n", rec.buffer.base, rec.buffer.size);
    195193        uintptr_t ptr = 0;
    196194        as_get_physical_mapping(rec.buffer.base, &ptr);
     
    222220cleanup:
    223221        munmap(rec.buffer.base, rec.buffer.size);
    224         audio_pcm_release_buffer(exch, rec.buffer.id);
     222        audio_pcm_release_buffer(exch);
    225223close_session:
    226224        async_exchange_end(exch);
Note: See TracChangeset for help on using the changeset viewer.