Changes in uspace/drv/audio/sb16/dsp.c [05b59393:f9b2cb4c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/dsp.c
r05b59393 rf9b2cb4c 75 75 [DSP_NO_BUFFER] = "NO BUFFER", 76 76 }; 77 if ( (size_t)state < ARRAY_SIZE(state_names))77 if (state < ARRAY_SIZE(state_names)) 78 78 return state_names[state]; 79 79 return "UNKNOWN"; … … 144 144 { 145 145 dsp_write(dsp, SET_SAMPLING_RATE_OUTPUT); 146 uint8_t rate_lo = rate & 0xff; 147 uint8_t rate_hi = rate >> 8; 148 dsp_write(dsp, rate_hi); 149 dsp_write(dsp, rate_lo); 150 ddf_log_verbose("Sampling rate: %hhx:%hhx.", rate_hi, rate_lo); 146 dsp_write(dsp, rate >> 8); 147 dsp_write(dsp, rate & 0xff); 148 ddf_log_verbose("Sampling rate: %hhx:%hhx.", rate >> 8, rate & 0xff); 151 149 } 152 150 … … 204 202 205 203 return ret; 204 } 205 206 static inline size_t sample_count(pcm_sample_format_t format, size_t byte_count) 207 { 208 return byte_count / pcm_sample_format_size(format); 206 209 } 207 210
Note:
See TracChangeset
for help on using the changeset viewer.