Home | All Classes | Grouped Classes | Index | Search

# CL_SoundBuffer::CL_SoundBuffer

Construct sound buffer.

    	CL_SoundBuffer();

    	CL_SoundBuffer(
    		const std::string& res_id, CL_ResourceManager* manager);

    	CL_SoundBuffer(
    		CL_SoundProvider* provider, bool delete_provider = false);

    	CL_SoundBuffer(
    		const std::string& filename, bool streamed = false, const std::string& format = "");

    	CL_SoundBuffer(
    		const CL_SoundBuffer& copy);

Detailed description:

A sound buffer can be constructed either as static or streamed. If the sound buffer is loaded from resources, the buffer type is determined by the resource option 'stream' associated with the resource.

CL_SoundBuffer's internals are reference counted, so the copy constructor will create a new soundbuffer object which shares the same buffer as the original one. This means that if the copy is modified, the original is affected as well.

If delete_provider is true, the provider will be deleted when the soundbuffer is deleted.

See also:

CL_ResourceManager | CL_Resource | CL_SoundProvider | CL_Sound | CL_SoundBuffer

Questions or comments, write to the ClanLib mailing list.