Changeset 4960:60cdebcb83ef in roaraudio for libroarpulse/sample.c


Ignore:
Timestamp:
05/14/11 04:46:29 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

some updates for pulseaudio emulation, converted libroarpulse-simple fully to VS API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/sample.c

    r4708 r4960  
    4141 
    4242/** 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); 
     43size_t pa_bytes_per_second(const pa_sample_spec *spec) { 
     44 return pa_sample_size(spec) * spec->channels * spec->rate; 
     45} 
    4446 
    4547/** Return the size of a frame with the specific sample type */ 
     
    6668    return 2; 
    6769   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 
    6884  default: 
    6985    return 0; 
Note: See TracChangeset for help on using the changeset viewer.