File: PlayableSound.h

package info (click to toggle)
transcend 0.3.dfsg2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,784 kB
  • sloc: cpp: 26,886; ansic: 693; sh: 210; makefile: 99; perl: 67
file content (69 lines) | stat: -rw-r--r-- 1,158 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 * Modification History
 *
 * 2004-August-6   Jason Rohrer
 * Created.
 */



#ifndef PLAYABLE_SOUND_INCLUDED
#define PLAYABLE_SOUND_INCLUDED



#include "SoundSamples.h"



/**
 * Interface for a sound source that can produce more samples on demand.
 *
 * @author Jason Rohrer
 */
class PlayableSound {


    public:

        

        /**
         * Gets more samples from this sound.
         *
         * @param inNumSamples the number of samples to get.
         *
         * @return the sound samples.  Must be destroyed by caller.
         *   At most inNumSamples are returned.  If less than inNumSamples
         *   are returned, this indicates that the end of the sound
         *   has been reached.
         */
        virtual SoundSamples *getMoreSamples( unsigned long inNumSamples ) = 0;


        
        /**
         * Makes a copy of this sound.
         *
         * @return a copy.
         *   Must be destroyed by caller.
         */
        virtual PlayableSound *copy() = 0;


        
        virtual ~PlayableSound();


        
    };



// to make the compilers happy
inline PlayableSound::~PlayableSound() {
    }



#endif