Changeset fe0b448 in mainline
- Timestamp:
- 2013-03-17T13:54:01Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 059490c2
- Parents:
- 36774cf
- Location:
- uspace/lib/pcm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcm/include/pcm/format.h
r36774cf rfe0b448 47 47 } pcm_format_t; 48 48 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 }; 49 extern const pcm_format_t AUDIO_FORMAT_DEFAULT; 50 extern const pcm_format_t AUDIO_FORMAT_ANY; 60 51 61 52 static inline size_t pcm_format_frame_size(const pcm_format_t *a) -
uspace/lib/pcm/src/format.c
r36774cf rfe0b448 74 74 #define from(x, type, endian) (float)(type ## _ ## endian ## 2host(x)) 75 75 #define to(x, type, endian) (float)(host2 ## type ## _ ## endian(x)) 76 77 const pcm_format_t AUDIO_FORMAT_DEFAULT = { 78 .channels = 2, 79 .sampling_rate = 44100, 80 .sample_format = PCM_SAMPLE_SINT16_LE, 81 }; 82 83 const pcm_format_t AUDIO_FORMAT_ANY = { 84 .channels = 0, 85 .sampling_rate = 0, 86 .sample_format = 0, 87 }; 76 88 77 89 static float get_normalized_sample(const void *buffer, size_t size,
Note:
See TracChangeset
for help on using the changeset viewer.