1999-07-23 09:15:58 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-07-23 09:15:58 +04:00
|
|
|
|
|
|
|
#ifndef __nsSound_h__
|
|
|
|
#define __nsSound_h__
|
|
|
|
|
|
|
|
#include "nsISound.h"
|
2000-06-04 11:13:40 +04:00
|
|
|
#include "nsIStreamLoader.h"
|
2013-09-19 17:54:39 +04:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
|
|
|
class nsIThread;
|
1999-07-23 09:15:58 +04:00
|
|
|
|
2000-06-04 11:13:40 +04:00
|
|
|
class nsSound : public nsISound,
|
|
|
|
public nsIStreamLoaderObserver
|
1999-07-23 09:15:58 +04:00
|
|
|
|
2000-06-04 11:13:40 +04:00
|
|
|
{
|
|
|
|
public:
|
1999-07-23 09:15:58 +04:00
|
|
|
nsSound();
|
|
|
|
virtual ~nsSound();
|
2011-09-04 22:40:15 +04:00
|
|
|
void ShutdownOldPlayerThread();
|
2000-06-04 11:13:40 +04:00
|
|
|
|
1999-07-23 09:15:58 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
1999-08-21 12:54:47 +04:00
|
|
|
NS_DECL_NSISOUND
|
2000-06-04 11:13:40 +04:00
|
|
|
NS_DECL_NSISTREAMLOADEROBSERVER
|
2001-08-30 02:31:38 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
void PurgeLastSound();
|
|
|
|
|
|
|
|
private:
|
2012-08-22 19:56:38 +04:00
|
|
|
uint8_t* mLastSound;
|
2009-07-07 05:47:08 +04:00
|
|
|
nsCOMPtr<nsIThread> mPlayerThread;
|
1999-07-23 09:15:58 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __nsSound_h__ */
|