Class hierarchy   Compound list   File list   Compound Members   File Members  

CON_Misc.h File Reference

Miscalenous interfaces. More...

Compounds

Enumerations

Functions


Detailed Description

Miscalenous interfaces.

Copyright (c) 1998-1999 by Amir Geva. This file is part of the Photon Game Development library, beta release version 0.21. Permission is granted to use and copy this file for non-commercial use only. Please contact the author concerning commercial usage. Amir Geva makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.


Function Documentation

DLLExport ResourceStream* newResourceStream()

Create a new ResourceStream that uses disk files directly.

DLLExport ResourceStream* newResourceStream(ofstream* os)

Create a new ResourceStream for writing.

Requires stream of the output resource file

DLLExport ResourceStream* newResourceStream(const char* Name, int Create=0)

Create a new ResourceStream for reading (Create=0) or writing (Create=1).

Will open a disk file by the given name.

__declspec( dllexport ) void setDebugLevel(int Level)

Sets the level of debugging information.

Defaults to 0 which outputs no log. Setting to a different value will create a log file 'libcon.log' That will be filled with printouts.

__declspec( dllexport ) void enableDiagnostics()

Enable a mechanizm that tracks allocated interfaces.

If used, it must be called before creating any interfaces. Diagnosis will be printed (If the debug level is set) when the program terminates. The printouts will contain the types of interfaces that were not released.

__declspec( dllexport ) void ReportError(long rc, const char* Message)

Can be used to append the log file with an error message.

rc is a return code, or any informational number.

__declspec( dllexport ) void ReportWarning(long rc, const char* Message, int MinDebug=1)

Can be used to append the log file with an warning message.

rc is a return code, or any informational number.

__declspec( dllexport ) void ReportInfo( const char* Message, int MinDebug=1)

Can be used to append the log file with an informational message.

DLLExport SoundClip* newSoundClip(char* AudioData, int Size, int Freq=44100, int Bits=16, int Channels=2, int HW=SoundAccel)

Create a new sound clip from raw data.

Size is in bytes.

DLLExport SoundClip* newSoundClip(istream* AudioData, int Size, int Freq=44100, int Bits=16, int Channels=2, int HW=SoundAccel)

Create a new sound clip from raw data (taken from a binary stream).

Size is in bytes.

DLLExport SoundStream* newSoundStream(ResourceStream* RS, istream* AudioData, int Freq=44100, int Bits=16, int Channels=2, int HW=0)

Create a new sound stream from raw data.

Stream must remain valid until this object is destroyed. Data will be streamed to the sound card continuously.

DLLExport SoundClip* loadWaveFile(istream* is, int HW=SoundAccel)

Loads a wave from a binary input stream.

DLLExport SoundClip* loadWaveFile(const char* Name, int HW=SoundAccel)

Loads a wave from the default resource stream (is it's set), or a file.

DLLExport SoundClip* loadWaveFile(Sound* S, istream& is, int HW)

Old version.

Provided for compatibility.

DLLExport SoundClip* loadWaveFile(Sound* S, const char* Name, int HW)

Old version.

Provided for compatibility.

DLLExport SoundStream* streamWaveFile(ResourceStream* RS, const char* Name, int HW=0)

Open a large wave file for streaming.

The ResourceStream must remain alive until the SoundStream is released. It will be used to release the data input stream.