These tutorials focus mainly on OpenGL, Win32 programming and the ODE physics engine. OpenGL has moved on to great heights and I don't cover the newest features but cover all of the basic concepts you will need with working example programs.


Working with the Win32 API is a great way to get to the heart of Windows and is just as relevant today as ever before. Whereas ODE has been marginalized as hardware accelerated physics becomes more common.


Games and graphics utilities can be made quickly and easily using game engines like Unity so this and Linux development in general will be the focus of my next tutorials.    



// Sound

#include "bass.h"           // Bass header

int device;                 // Selected devicee

BOOL lowqual;               // Low quality option flag

int SphereSector;           // Current sector (leaf of bsp tree) of the sphere

VECTOR SpherePosition;          // Sphere position

int numSamples = 0;                 // The number of sound samples in the list

int numChannels = 0;                    // The number of channels in the list

#include "sound.cpp"                    // Sound classes & functions

LinkedList<SOUND_SAMPLE> SampleList;    // The list of samples

LinkedList<SOUND_CHANNEL> ChannelList;  // The list of channels

After the inclusion of bass.h there is a device id to the selected output device followed by a flag for the low quality sound option. Then there is the id to the current sector (leaf number in the BSP tree) of the sphere's position and the position itself. After these are the number of samples and channels in each list, followed by the inclusion of the sound classes and functions, and then the two lists themselves.






        int Compare(const SOUND_SAMPLE& Sample);

        int GetMyPosition() const {return linkPosition;}

        void SetMyPosition(int newPosition) {linkPosition = newPosition;}

        int linkPosition;

        HSAMPLE hSample;  // the sample's handle

        char name[32];    // filename

        int max;          // number of simultaneous playbacks

        DWORD flags;      // option flags

        DWORD volume;     // sample volume

        float mindist;    // distance at which it stops getting louder

                // distance at which it stops getting quieter/muted

        float maxdist;     







        int Compare(const SOUND_CHANNEL& Channel);

        int GetMyPosition() const {return linkPosition;}

        void SetMyPosition(int newPosition) {linkPosition = newPosition;}

        int linkPosition;

        HCHANNEL hChannel;         // the channel's handle

        // handle of the sample associated with this channel

                HSAMPLE hSample; 

        BASS_3DVECTOR position;      // position

        BASS_3DVECTOR orientation;   // orientation

        BASS_3DVECTOR velocity;         // velocity

        int direction;             // direction of the channel

        bool looped;                 // flag for looped sample

        bool intermittent;           // flag for intermittent sound

        bool random;                 // flag for random intermittent sound

        unsigned int lowerrand;      // minimum repeat time

        unsigned int upperrand;      // maximum repeat time

        unsigned int interval;       // time between plays

                // unique timer id (set this to the channel number)

        unsigned int idEvent;