|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
|
2 * |
|
3 * This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #ifndef __nsSound_h__ |
|
8 #define __nsSound_h__ |
|
9 |
|
10 #include "nsISound.h" |
|
11 #include "nsIStreamLoader.h" |
|
12 #include "nsCOMPtr.h" |
|
13 |
|
14 class nsIThread; |
|
15 |
|
16 class nsSound : public nsISound, |
|
17 public nsIStreamLoaderObserver |
|
18 |
|
19 { |
|
20 public: |
|
21 nsSound(); |
|
22 virtual ~nsSound(); |
|
23 void ShutdownOldPlayerThread(); |
|
24 |
|
25 NS_DECL_ISUPPORTS |
|
26 NS_DECL_NSISOUND |
|
27 NS_DECL_NSISTREAMLOADEROBSERVER |
|
28 |
|
29 private: |
|
30 void PurgeLastSound(); |
|
31 |
|
32 private: |
|
33 uint8_t* mLastSound; |
|
34 nsCOMPtr<nsIThread> mPlayerThread; |
|
35 }; |
|
36 |
|
37 #endif /* __nsSound_h__ */ |