source: trunk/src/sample.h @ 2492

Last change on this file since 2492 was 2492, checked in by sam, 10 years ago

audio: add a simple Stop() method to samples.

  • Property svn:keywords set to Id
File size: 910 bytes
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://www.wtfpl.net/ for more details.
9//
10
11//
12// The Sample class
13// ----------------
14// A Sample is a unique sound sample.
15//
16
17#if !defined __LOL_SAMPLE_H__
18#define __LOL_SAMPLE_H__
19
20#include <stdint.h>
21
22#include "entity.h"
23
24namespace lol
25{
26
27class SampleData;
28
29class Sample : public Entity
30{
31public:
32    Sample(char const *path);
33    virtual ~Sample();
34
35protected:
36    /* Inherited from Entity */
37    virtual char const *GetName();
38    virtual void TickGame(float seconds);
39
40public:
41    /* New methods */
42    void Play();
43    void Stop();
44
45private:
46    SampleData *data;
47};
48
49} /* namespace lol */
50
51#endif // __LOL_SAMPLE_H__
52
Note: See TracBrowser for help on using the repository browser.