//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// ! Load a streaming sound @param sSound filename of the sound @return nil or sound ID in case of success */ int CScriptObjectSound::LoadStreamSoundLocalized(IFunctionHandler *pH) { if (pH->GetParamCount()<1 || pH->GetParamCount()>2) { m_pSc
| 587 | @see CScriptObjectSound::SetSoundLoop |
| 588 | */ |
| 589 | int CScriptObjectSound::PlaySound(IFunctionHandler *pH) |
| 590 | { |
| 591 | int nCookie=0; |
| 592 | float fVolumeScale=1.0f; |
| 593 | ISound *pSound=NULL; |
| 594 | |
| 595 | if(pH->GetParamUDVal(1,(USER_DATA &)pSound,nCookie) && pSound && (nCookie==USER_DATA_SOUND)) //AMD Port |
| 596 | { |
| 597 | if (pH->GetParamCount()>1) |
| 598 | { |
| 599 | if(!pH->GetParam(2,fVolumeScale)) |
| 600 | { |
| 601 | fVolumeScale=1.0f; |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | pSound->Play(fVolumeScale); |
| 606 | } |
| 607 | else |
| 608 | { |
| 609 | if(m_pSoundSystem) |
| 610 | m_pScriptSystem->RaiseError("PlaySound NULL SOUND!!"); |
| 611 | } |
| 612 | return pH->EndFunction(); |
| 613 | } |
| 614 | |
| 615 | ////////////////////////////////////////////////////////////////////////// |
| 616 | int CScriptObjectSound::PlaySoundFadeUnderwater(IFunctionHandler *pH) |
nothing calls this directly
no test coverage detected