| 2225 | drmp3_uint64 drmp3_src_read_frames_linear(drmp3_src* pSRC, drmp3_uint64 frameCount, void* pFramesOut, drmp3_bool32 flush); |
| 2226 | |
| 2227 | drmp3_bool32 drmp3_src_init(const drmp3_src_config* pConfig, drmp3_src_read_proc onRead, void* pUserData, drmp3_src* pSRC) |
| 2228 | { |
| 2229 | if (pSRC == NULL) return DRMP3_FALSE; |
| 2230 | drmp3_zero_object(pSRC); |
| 2231 | |
| 2232 | if (pConfig == NULL || onRead == NULL) return DRMP3_FALSE; |
| 2233 | if (pConfig->channels == 0 || pConfig->channels > 2) return DRMP3_FALSE; |
| 2234 | |
| 2235 | pSRC->config = *pConfig; |
| 2236 | pSRC->onRead = onRead; |
| 2237 | pSRC->pUserData = pUserData; |
| 2238 | |
| 2239 | if (pSRC->config.cacheSizeInFrames > DRMP3_SRC_CACHE_SIZE_IN_FRAMES || pSRC->config.cacheSizeInFrames == 0) { |
| 2240 | pSRC->config.cacheSizeInFrames = DRMP3_SRC_CACHE_SIZE_IN_FRAMES; |
| 2241 | } |
| 2242 | |
| 2243 | drmp3_src_cache_init(pSRC, &pSRC->cache); |
| 2244 | return DRMP3_TRUE; |
| 2245 | } |
| 2246 | |
| 2247 | drmp3_bool32 drmp3_src_set_input_sample_rate(drmp3_src* pSRC, drmp3_uint32 sampleRateIn) |
| 2248 | { |
no test coverage detected