! Determine if a sound is still playing @param nID ID of the sound @return nil or not nil */
| 122 | @return nil or not nil |
| 123 | */ |
| 124 | int CScriptObjectSound::IsPlaying(IFunctionHandler *pH) |
| 125 | { |
| 126 | CHECK_PARAMETERS(1); |
| 127 | int nCookie=0; |
| 128 | bool bRes=false; |
| 129 | ISound *pSound=NULL; |
| 130 | |
| 131 | pH->GetParamUDVal(1,(USER_DATA&)pSound,nCookie); //AMD Port |
| 132 | if (pSound && (nCookie==USER_DATA_SOUND)) |
| 133 | { |
| 134 | if (pSound->IsPlaying()) |
| 135 | bRes=true; |
| 136 | else |
| 137 | bRes=false; |
| 138 | } |
| 139 | |
| 140 | return pH->EndFunction(bRes); |
| 141 | } |
| 142 | |
| 143 | /*! Load a 2D sound |
| 144 | @param sSound filename of the sound |
nothing calls this directly
no test coverage detected