## Public API Reference

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

- File List
- File Members

# isndsys/ss_stream.h

Go to the documentation of this file.

    00001 /*
    00002     Copyright (C) 2004 by Andrew Mann
    00003     Copyright (C) 1998-2000 by Jorrit Tyberghein
    00004
    00005     This library is free software; you can redistribute it and/or
    00006     modify it under the terms of the GNU Library General Public
    00007     License as published by the Free Software Foundation; either
    00008     version 2 of the License, or (at your option) any later version.
    00009
    00010     This library is distributed in the hope that it will be useful,
    00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013     Library General Public License for more details.
    00014
    00015     You should have received a copy of the GNU Library General Public
    00016     License along with this library; if not, write to the Free
    00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00018 */
    00019
    00020 #ifndef __CS_SNDSYS_STREAM_H__
    00021 #define __CS_SNDSYS_STREAM_H__
    00022
    00027 #include "csutil/scf.h"
    00028
    00032 struct csSndSysSoundFormat;
    00033 struct iSndSysData;
    00034
    00035 const size_t CS_SNDSYS_STREAM_UNKNOWN_LENGTH = (size_t)-1;
    00036
    00037 #define CS_SNDSYS_STREAM_PAUSED     0
    00038 #define CS_SNDSYS_STREAM_UNPAUSED   1
    00039
    00040 #define CS_SNDSYS_STREAM_DONTLOOP   0
    00041 #define CS_SNDSYS_STREAM_LOOP       1
    00042
    00044 enum
    00045 {
    00047   CS_SND3D_DISABLE=0,
    00049   CS_SND3D_RELATIVE,
    00051   CS_SND3D_ABSOLUTE
    00052 };
    00053
    00054 SCF_VERSION (iSndSysStream, 0, 1, 0);
    00055
    00059 struct iSndSysStream : public iBase
    00060 {
    00065   virtual const csSndSysSoundFormat *GetRenderedFormat() = 0;
    00066
    00068   virtual int Get3dMode() = 0;
    00069
    00076   virtual size_t GetSampleCount() = 0;
    00077
    00088   virtual size_t GetPosition() = 0;
    00089
    00095   virtual bool ResetPosition() = 0;
    00096
    00102   virtual bool SetPosition (size_t newposition) = 0;
    00103
    00116   virtual bool Pause() = 0;
    00117
    00122   virtual bool Unpause() = 0;
    00123
    00130   virtual int GetPauseState() = 0;
    00131
    00137   virtual bool SetLoopState(int loopstate) = 0;
    00138
    00143   virtual int GetLoopState() = 0;
    00144
    00149   virtual void SetPlayRatePercent(int percent) = 0;
    00150
    00155   virtual int GetPlayRatePercent() = 0;
    00156
    00161   virtual void SetAutoUnregister(bool autounreg) = 0;
    00162
    00167   virtual bool GetAutoUnregister() = 0;
    00168
    00173   virtual bool GetAutoUnregisterRequested() = 0;
    00174
    00175
    00189   virtual void AdvancePosition(csTicks current_time) = 0;
    00190
    00225   virtual void GetDataPointers(size_t* position_marker,
    00226         size_t max_requested_length,
    00227         void **buffer1, size_t *buffer1_length,
    00228         void **buffer2, size_t *buffer2_length) = 0;
    00229
    00236   virtual void InitializeSourcePositionMarker (size_t* position_marker) = 0;
    00237
    00239   virtual iSndSysStream *GetPtr() = 0;
    00240 };
    00241
    00244 #endif // __CS_SNDSYS_STREAM_H__