Changeset 4960:60cdebcb83ef in roaraudio for libroarpulse/sample.c
- Timestamp:
- 05/14/11 04:46:29 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/sample.c
r4708 r4960 41 41 42 42 /** Return the amount of bytes playback of a second of audio with the specified sample type takes */ 43 size_t pa_bytes_per_second(const pa_sample_spec *spec); 43 size_t pa_bytes_per_second(const pa_sample_spec *spec) { 44 return pa_sample_size(spec) * spec->channels * spec->rate; 45 } 44 46 45 47 /** Return the size of a frame with the specific sample type */ … … 66 68 return 2; 67 69 break; 70 #ifdef PA_SAMPLE_S24LE 71 case PA_SAMPLE_S24LE: 72 case PA_SAMPLE_S24BE: 73 return 3; 74 break; 75 #endif 76 #ifdef PA_SAMPLE_S32LE 77 case PA_SAMPLE_S32LE: 78 case PA_SAMPLE_S32BE: 79 case PA_SAMPLE_S24_32LE: 80 case PA_SAMPLE_S24_32BE: 81 return 4; 82 break; 83 #endif 68 84 default: 69 85 return 0;
Note: See TracChangeset
for help on using the changeset viewer.