1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
11 #include "nsIObserver.h"
12 #include "nsIStreamLoader.h"
14 #include "mozilla/StaticPtr.h"
19 class nsSound
: public nsISound
,
20 public nsIStreamLoaderObserver
,
26 static already_AddRefed
<nsISound
> GetInstance();
30 NS_DECL_NSISTREAMLOADEROBSERVER
35 void PurgeLastSound();
38 nsresult
CreatePlayerThread();
40 nsCOMPtr
<nsIThread
> mPlayerThread
;
41 nsCOMPtr
<nsIRunnable
> mSoundPlayer
;
44 static mozilla::StaticRefPtr
<nsISound
> sInstance
;
47 #endif /* __nsSound_h__ */