Logo Search packages:      
Sourcecode: blender version File versions  Download package

void AUD_SDLMixer::superpose ( sample_t *  buffer,
int  length,
float  volume 
) [virtual]

Superposes all added buffers into an output buffer.

Parameters:
buffer The target buffer for superposing.
length The length of the buffer in samples.
volume The mixing volume. Must be a value between 0.0 and 1.0.

Implements AUD_IMixer.

Definition at line 70 of file AUD_SDLMixer.cpp.

References m_buffers, and m_samplesize.

{
      AUD_SDLMixerBuffer buf;

      while(!m_buffers.empty())
      {
            buf = m_buffers.front();
            m_buffers.pop_front();
            SDL_MixAudio((Uint8*)buffer,
                               (Uint8*)buf.buffer,
                               buf.length * m_samplesize,
                               (int)(SDL_MIX_MAXVOLUME * volume * buf.volume));
      }
}


Generated by  Doxygen 1.6.0   Back to index