示例#1
0
void MyStream::load(const sf::SoundBuffer& buffer)
    {
        // extract the audio samples from the sound buffer to our own container
        m_samples.assign(buffer.getSamples(), buffer.getSamples() + buffer.getSampleCount());

        // reset the current playing position 
        m_currentSample = 0;

        // initialize the base class
        initialize(buffer.getChannelCount(), buffer.getSampleRate());
    }
示例#2
0
 void load(const sf::SoundBuffer& buffer)
 {
     m_samples.assign(buffer.getSamples(), buffer.getSamples() + buffer.getSampleCount());
     m_currentSample = 0;
     initialize(buffer.getChannelCount(), buffer.getSampleRate());
 }