File: nebu_SourceSample.h

package info (click to toggle)
gltron 0.70final-9
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 5,208 kB
  • ctags: 5,051
  • sloc: ansic: 19,181; sh: 3,443; cpp: 973; makefile: 269
file content (33 lines) | stat: -rw-r--r-- 528 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
#ifndef NEBU_Sound_SourceSample_H
#define NEBU_Sound_SourceSample_H

#include "nebu_Sound.h"

#include "nebu_Source.h"
#include "nebu_SoundSystem.h"

namespace Sound {
  class SourceSample : public Source {
  public:
    SourceSample(System *system);
    virtual ~SourceSample();
    void Load(char *filename);
    virtual int Mix(Uint8 *data, int len);

    Uint8* _buffer;
    int _buffersize;

  protected:
    virtual void Reset() { _position = 0; }
      
  private:
    int _position;
    int _decoded;
  };
}
#endif