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

static bool Agi::convertWave ( Common::SeekableReadStream source,
int8 *  dest,
uint  length 
) [static]

Convert sample from 8-bit unsigned to 8-bit signed format.

Parameters:
source Source stream containing the 8-bit unsigned sample data.
dest Destination buffer for the 8-bit signed sample data.
length Length of the sample data to be converted.

Definition at line 420 of file sound_2gs.cpp.

References convertWave(), Common::ReadStream::eos(), Common::Stream::err(), and Common::ReadStream::readByte().

Referenced by convertWave().

                                                                                   {
      // Convert the wave from 8-bit unsigned to 8-bit signed format
      for (uint i = 0; i < length; i++)
            dest[i] = (int8) ((int) source.readByte() - 128);
      return !(source.eos() || source.err());
}


Generated by  Doxygen 1.6.0   Back to index