/*****************************************************************************
 * $LastChangedDate: 2011-04-23 21:07:07 -0400 (Sat, 23 Apr 2011) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Class for loading sound files into a memory buffer.
 *//*
 * LEGAL:   COPYRIGHT (C) 2009 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef SOUND_SOUND_BUFFER_HH
#define SOUND_SOUND_BUFFER_HH 1

#include <utility>

namespace sound {

////////////////////////////////////////////////////////////////////////////////
/// @brief Class for loading sound files into a memory buffer.
///
/// Internal to sound module.
///
/// SoundBuffer is an auto-destroying object.
///
class SoundBuffer
{
COPYABLE(SoundBuffer)
public:
            SoundBuffer( const string& soundFilename );
            ~SoundBuffer();
    void*   GetBuf( void ) { return mBufAndSize.first; }
    long    GetSize( void ) { return mBufAndSize.second; }

private:
    std::pair<void*,long> mBufAndSize;
#if SOUND_VERBOSE
    const string          mName;
#endif
};

} // namespace sound

#endif // SOUND_SOUND_BUFFER_HH
