Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

XFuXMPlayer.cpp File Reference

XM player. More...

#include <stdlib.h>
#include <stdarg.h>
#include <xfcore/XFcCore.h>
#include <xfcore/XFcAudioFlags.h>
#include <xfcore/XFcLinkedList.h>
#include <xfutil/XFuXMPlayer.h>
#include <xfutil/XFuXMPlayer_internal.h>
#include <xfutil/XFuXMPlayerEventHandler.h>

Include dependency graph for XFuXMPlayer.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define ABS(x)   (((x) < 0) ? -(x) : (x))
#define interpolateLinear8(ch, val1, val2)
#define interpolateLinear16(ch, val1, val2)
#define interpolateLinearForwardLoop8(ch, val1, val2, temp)
#define interpolateLinearForwardLoop16(ch, val1, val2, temp)
#define interpolateLinearBidirectionalLoop8(ch, val1, val2, temp)
#define interpolateLinearBidirectionalLoop16(ch, val1, val2, temp)
#define addPointer(ch)
#define addPointerForwardLoop(ch)
#define addPointerBidirectionalLoop(ch)

Variables

const INT32 linearFrequencyTable [768]


Detailed Description

XM player.

X-Forge Util
Copyright 2000-2003 Fathammer Ltd

Todo:
doxygen comments

Panning envelope support on "key off"

Random waveform support for vibrato and tremolo

Set glissando control -command

Id
XFuXMPlayer.cpp,v 1.55 2003/10/10 11:34:51 toni Exp
Date
2003/10/10 11:34:51
Revision
1.55

Definition in file XFuXMPlayer.cpp.


Define Documentation

#define ABS      (((x) < 0) ? -(x) : (x))
 

Definition at line 127 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().

#define addPointer ch   
 

Value:

ch.mPointer += ch.mSpeed; \
    if (ch.mPointer > (ch.mLength - FP_VALUE)) \
        ch.mIsSample = 0;

Definition at line 187 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().

#define addPointerBidirectionalLoop ch   
 

Value:

if (ch.mDirection == 1) \
    { \
        ch.mPointer += ch.mSpeed; \
        \
        if ((ch.mPointer >> FP_BITS) > (ch.mLoopEnd >> FP_BITS)) \
        { \
            ch.mDirection = -1; \
            ch.mPointer = ch.mLoopEnd - (ch.mPointer - (ch.mLoopEnd + FP_VALUE)); \
        } \
    } \
    else \
    { \
        ch.mPointer -= ch.mSpeed; \
        \
        if ((ch.mPointer >> FP_BITS) < (ch.mLoopStart >> FP_BITS)) \
        { \
            ch.mDirection = 1; \
            ch.mPointer = ch.mLoopStart + (ch.mLoopStart - ch.mPointer); \
        } \
    }

Definition at line 199 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().

#define addPointerForwardLoop ch   
 

Value:

ch.mPointer += ch.mSpeed; \
    if ((ch.mPointer >> FP_BITS) > (ch.mLoopEnd >> FP_BITS)) \
        ch.mPointer = ch.mLoopStart + (ch.mPointer - (ch.mLoopEnd + FP_VALUE));

Definition at line 193 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().

#define interpolateLinear16 ch,
val1,
val2   
 

Value:

val1 = *((INT16 *)ch.mOffset + (ch.mPointer >> FP_BITS)); \
    \
    if ((ch.mPointer + FP_VALUE) < ch.mLength) \
        val2 = *((INT16 *)ch.mOffset + ((ch.mPointer + FP_VALUE) >> FP_BITS)); \
    else \
        val2 = 0;

Definition at line 138 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().

#define interpolateLinear8 ch,
val1,
val2   
 

Value:

val1 = *((INT8 *)ch.mOffset + (ch.mPointer >> FP_BITS)); \
    \
    if ((ch.mPointer + FP_VALUE) < ch.mLength) \
        val2 = *((INT8 *)ch.mOffset + ((ch.mPointer + FP_VALUE) >> FP_BITS)); \
    else \
        val2 = 0;

Definition at line 129 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().

#define interpolateLinearBidirectionalLoop16 ch,
val1,
val2,
temp   
 

Value:

val1 = *((INT16 *)ch.mOffset + (ch.mPointer >> FP_BITS)); \
    \
    temp = (ch.mPointer + FP_VALUE); \
    if ((temp >> FP_BITS) > (ch.mLoopEnd >> FP_BITS)) \
        temp = ch.mLoopEnd - (temp - (ch.mLoopEnd + FP_VALUE)); \
    \
    val2 = *((INT16 *)ch.mOffset + (temp >> FP_BITS));

Definition at line 177 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().

#define interpolateLinearBidirectionalLoop8 ch,
val1,
val2,
temp   
 

Value:

val1 = *((INT8 *)ch.mOffset + (ch.mPointer >> FP_BITS)); \
    \
    temp = (ch.mPointer + FP_VALUE); \
    if ((temp >> FP_BITS) > (ch.mLoopEnd >> FP_BITS)) \
        temp = ch.mLoopEnd - (temp - (ch.mLoopEnd + FP_VALUE)); \
    \
    val2 = *((INT8 *)ch.mOffset + (temp >> FP_BITS)); \

Definition at line 167 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().

#define interpolateLinearForwardLoop16 ch,
val1,
val2,
temp   
 

Value:

val1 = *((INT16 *)ch.mOffset + (ch.mPointer >> FP_BITS)); \
    \
    temp = (ch.mPointer + FP_VALUE); \
    if ((temp >> FP_BITS) > (ch.mLoopEnd >> FP_BITS)) \
        temp = ch.mLoopStart + (temp - (ch.mLoopEnd + FP_VALUE)); \
    \
    val2 = *((INT16 *)ch.mOffset + (temp >> FP_BITS));

Definition at line 157 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().

#define interpolateLinearForwardLoop8 ch,
val1,
val2,
temp   
 

Value:

val1 = *((INT8 *)ch.mOffset + (ch.mPointer >> FP_BITS)); \
    \
    temp = (ch.mPointer + FP_VALUE); \
    if ((temp >> FP_BITS) > (ch.mLoopEnd >> FP_BITS)) \
        temp = ch.mLoopStart + (temp - (ch.mLoopEnd + FP_VALUE)); \
    \
    val2 = *((INT8 *)ch.mOffset + (temp >> FP_BITS));

Definition at line 147 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::stream().


Variable Documentation

const INT32 linearFrequencyTable[768] [static]
 

Definition at line 26 of file XFuXMPlayer.cpp.

Referenced by XFuXMPlayer::getSpeed().


   
X-Forge Documentation
Confidential
Copyright © 2002-2003 Fathammer
   
Documentation generated
with doxygen
by Dimitri van Heesch