Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: runtime/embedders/openglui/common/sound_handler.h

Issue 25081002: Remove openglui embedder code (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef EMBEDDERS_OPENGLUI_COMMON_SOUND_HANDLER_H_
6 #define EMBEDDERS_OPENGLUI_COMMON_SOUND_HANDLER_H_
7
8 #include <stdint.h>
9 #include <vector>
10
11 #include "embedders/openglui/common/sample.h"
12
13 class SoundHandler {
14 public:
15 SoundHandler();
16
17 virtual ~SoundHandler() {
18 }
19
20 virtual int32_t Start() {
21 return 0;
22 }
23
24 virtual void Stop() {
25 }
26
27 virtual int32_t Suspend() {
28 return 0;
29 }
30
31 virtual int32_t Resume() {
32 return 0;
33 }
34
35 virtual int32_t PlayBackground(const char* path) {
36 return 0;
37 }
38
39 virtual void StopBackground() {
40 }
41
42 // Optional, for preloading.
43 int32_t LoadSample(const char* path) {
44 return (GetSample(path) == NULL) ? -1 : 0;
45 }
46
47 virtual int32_t PlaySample(const char* path) {
48 // Just do a load so we can get logging.
49 return (GetSample(path) == NULL) ? -1 : 0;
50 }
51
52 protected:
53 typedef std::vector<Sample*> samples_t;
54
55 Sample* GetSample(const char* path);
56
57 samples_t samples_;
58 };
59
60 int32_t PlayBackgroundSound(const char* path);
61 void StopBackgroundSound();
62 int32_t LoadSoundSample(const char* path);
63 int32_t PlaySoundSample(const char* path);
64
65 #endif // EMBEDDERS_OPENGLUI_COMMON_SOUND_HANDLER_H_
66
OLDNEW
« no previous file with comments | « runtime/embedders/openglui/common/sample.h ('k') | runtime/embedders/openglui/common/sound_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698