~ubuntu-branches/debian/sid/ember/sid

« back to all changes in this revision

Viewing changes to src/services/sound/SoundGeneral.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2009-07-23 07:46:40 UTC
  • Revision ID: james.westby@ubuntu.com-20090723074640-wh0ukzis0kda36qv
Tags: upstream-0.5.6
ImportĀ upstreamĀ versionĀ 0.5.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2008 Romulo Fernandes Machado (nightz)
 
3
    Copyright (C) 2008 Erik Hjortsberg <erik.hjortsberg@gmail.com>
 
4
 
 
5
    This program is free software; you can redistribute it and/or modify
 
6
    it under the terms of the GNU General Public License as published by
 
7
    the Free Software Foundation; either version 2 of the License, or
 
8
    (at your option) any later version.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
    GNU General Public License for more details.
 
14
 
 
15
    You should have received a copy of the GNU General Public License
 
16
    along with this program; if not, write to the Free Software
 
17
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
18
*/
 
19
 
 
20
#ifndef SOUND_GENERAL_H
 
21
#define SOUND_GENERAL_H
 
22
 
 
23
#include <string>
 
24
 
 
25
 
 
26
// #define OGG_BUFFER_SIZE (4096 * 8)
 
27
 
 
28
namespace Ember 
 
29
{
 
30
class SoundGeneral
 
31
{
 
32
public:
 
33
        enum SoundSampleType
 
34
        {
 
35
                SAMPLE_NONE, // Try To guess by file extension
 
36
                SAMPLE_PCM,
 
37
                SAMPLE_WAV,
 
38
                SAMPLE_OGG
 
39
        };
 
40
 
 
41
        /**
 
42
         * @brief Checks for any errors in the OpenAL context.
 
43
         * If an error has occurred, it's logged and this method returns false.
 
44
         * Make sure to call this after you've interacted with OpenAL to make sure that the internal error state is reset in time for the next call to OpenAL. If not, the errors will carry over.
 
45
         * @param  description If an error occurs, an entry will be written to the log. If you provide a description this will be added too, which might be good when looking through the log and figuring out what's wrong.
 
46
         * @return False if an error has occurred, else true.
 
47
         */
 
48
        static bool checkAlError(const std::string& description = "");
 
49
};
 
50
}
 
51
 
 
52
 
 
53
#endif
 
54