| DemoGL::Reference::Functions::DEMOGL_SoundSystemStartElement |
int DEMOGL_SoundSystemStartElement( const int iElementCodeID, const int iElementType, const long lStartPos, const bool bLoop, const int iVolume, const int iPan, const int iFrequency, SSoundChannel3DPosition * const p3DPosition, const char *pszChannelScriptID );
| Sound element type | Description |
| DGL_SS_MP3ELEMENT | Sound element stored in the MP3 standard, i.e. MPEG v1.0 and v2.0 layer3. |
| DGL_SS_MODELEMENT | Sound element stored in one of the following formats: MOD, XM, IT, S3M or MTM. |
| DGL_SS_SAMPLEELEMENT | Sound element stored in the standard windows PCM format, or compressed with a custom CODEC. When you use a custom CODEC, this CODEC is required to be installed on the user's computer for the WAV to be decoded. So, you should either distribute the CODEC with your software, or use a CODEC that comes with Windows (eg. Microsoft ADPCM). |
| Error code | Description |
| DGL_SS_ERR_CHANNELSTOREFULL | Sound element couldn't be started because the channel store is full, there are no more free channels left. |
| DGL_SS_ERR_CHANNELACTIONFAILED | Sound element couldn't be started because the play of the sounddata failed. An errorcode of the lower level sound library is logged on the system console. These errorcodes are defined in DemoGL_Bass.h. Most of these errors are 3D sound related. |
| DGL_SS_ERR_OPERATIONFAILED | Could not start the sound element data, the play and / or the seek into the data to the lStartPos failed. |
| DGL_SS_ERR_ILLEGALELEMENTID | The iElementCodeID value is not found as a loaded sound element. |
NOTE: There is just one listener position in the sound system, because that's the way the underlying sound library works. This way, you have to keep in mind that two or more effects visible at the same time with total different scenes have to use the same global listener position for their 3D enabled sound channels. It will be odd at first, but it's the same way OpenGL works: there is no camera, the frustum is always at (0,0,0) looking at the negative Z, the world is moved/rotated so it looks as if the 'camera' is rotated/moved. Updating the global listener position in more than one effect in one frame is useless: only the last one will have any effect.
Last changed on 18-jan-2001
©1999-2001 Solutions Design