## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# isndsys/ss_driver.h

Go to the documentation of this file.

    00001 /*
    00002     Copyright (C) 2004 by Andrew Mann
    00003
    00004     This library is free software; you can redistribute it and/or
    00005     modify it under the terms of the GNU Library General Public
    00006     License as published by the Free Software Foundation; either
    00007     version 2 of the License, or (at your option) any later version.
    00008
    00009     This library is distributed in the hope that it will be useful,
    00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012     Library General Public License for more details.
    00013
    00014     You should have received a copy of the GNU Library General Public
    00015     License along with this library; if not, write to the Free
    00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00017 */
    00018
    00019 #ifndef __CS_SNDSYS_DRIVER_H__
    00020 #define __CS_SNDSYS_DRIVER_H__
    00021
    00026 #include "csutil/scf.h"
    00027
    00031 // @@@ FIXME: This should really be an interface
    00032 class csSndSysRendererSoftware;
    00033 struct csSndSysSoundFormat;
    00034
    00035 SCF_VERSION (iSndSysSoftwareDriver, 0, 1, 0);
    00036
    00037 /* TODO:  Define a csSoundDevice structure that can be used to return
    00038  *        information about playback devices available for use by this driver.
    00039  *        Add interface functionality for enumerating and selecting particular
    00040  *        playback devices.
    00041  */
    00042
    00048 struct iSndSysSoftwareDriver : public iBase
    00049 {
    00055   virtual bool Open(csSndSysRendererSoftware *renderer,
    00056         csSndSysSoundFormat *requested_format) = 0;
    00057
    00059   virtual void Close () = 0;
    00060
    00061
    00065   virtual bool StartThread() = 0;
    00066
    00068   virtual void StopThread() = 0;
    00069
    00070
    00072
    00073   // virtual vool DriverProvidesThread() = 0;
    00074   //  The Sound System always needs its own background thread, but in some
    00075   //  instances the low level interface to the OS based sound system
    00076   //   can provide more accurate buffer fill requests through callbacks or
    00077   //   some other mechanism.  Since only the driver code knows about this,
    00078   //   and since we would like to use the most accurate method possible,
    00079
    00080
    00082
    00083
    00085   //virtual void LockMemory (void **mem, int *memsize) = 0;
    00087   //virtual void UnlockMemory () = 0;
    00089   //virtual bool IsBackground () = 0;
    00090
    00095   //virtual bool IsHandleVoidSound () = 0;
    00096   // @@@ temporary
    00097   //virtual bool ThreadAware (){ return false; }
    00098 };
    00099
    00102 #endif // __CS_SNDSYS_DRIVER_H__