| 625 | } |
| 626 | |
| 627 | int CSound::LoadOpusFromMem(const void *pData, unsigned DataSize, bool ForceLoad, const char *pContextName) |
| 628 | { |
| 629 | // no need to load sound when we are running with no sound |
| 630 | if(!m_SoundEnabled && !ForceLoad) |
| 631 | return -1; |
| 632 | |
| 633 | CSample *pSample = AllocSample(); |
| 634 | if(!pSample) |
| 635 | return -1; |
| 636 | |
| 637 | if(!DecodeOpus(*pSample, pData, DataSize, pContextName)) |
| 638 | { |
| 639 | UnloadSample(pSample->m_Index); |
| 640 | return -1; |
| 641 | } |
| 642 | |
| 643 | RateConvert(*pSample); |
| 644 | return pSample->m_Index; |
| 645 | } |
| 646 | |
| 647 | int CSound::LoadWVFromMem(const void *pData, unsigned DataSize, bool ForceLoad, const char *pContextName) |
| 648 | { |
no outgoing calls
no test coverage detected