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

Changeset fe0b448 in mainline


Ignore:
Timestamp:
2013-03-17T13:54:01Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
059490c2
Parents:
36774cf
Message:

libpcm: Move constant definitions to .c file

Location:
uspace/lib/pcm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcm/include/pcm/format.h

    r36774cf rfe0b448  
    4747} pcm_format_t;
    4848
    49 static const pcm_format_t AUDIO_FORMAT_DEFAULT = {
    50         .channels = 2,
    51         .sampling_rate = 44100,
    52         .sample_format = PCM_SAMPLE_SINT16_LE,
    53         };
    54 
    55 static const pcm_format_t AUDIO_FORMAT_ANY = {
    56         .channels = 0,
    57         .sampling_rate = 0,
    58         .sample_format = 0,
    59         };
     49extern const pcm_format_t AUDIO_FORMAT_DEFAULT;
     50extern const pcm_format_t AUDIO_FORMAT_ANY;
    6051
    6152static inline size_t pcm_format_frame_size(const pcm_format_t *a)
  • uspace/lib/pcm/src/format.c

    r36774cf rfe0b448  
    7474#define from(x, type, endian) (float)(type ## _ ## endian ## 2host(x))
    7575#define to(x, type, endian) (float)(host2 ## type ## _ ## endian(x))
     76
     77const pcm_format_t AUDIO_FORMAT_DEFAULT = {
     78        .channels = 2,
     79        .sampling_rate = 44100,
     80        .sample_format = PCM_SAMPLE_SINT16_LE,
     81        };
     82
     83const pcm_format_t AUDIO_FORMAT_ANY = {
     84        .channels = 0,
     85        .sampling_rate = 0,
     86        .sample_format = 0,
     87        };
    7688
    7789static float get_normalized_sample(const void *buffer, size_t size,
Note: See TracChangeset for help on using the changeset viewer.