1999-07-23 05:15:58 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 11:12:37 +00: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 05:15:58 +00:00
|
|
|
|
|
|
|
#ifndef __nsSound_h__
|
|
|
|
#define __nsSound_h__
|
|
|
|
|
|
|
|
#include "nsISound.h"
|
2000-06-04 07:13:40 +00:00
|
|
|
#include "nsIStreamLoader.h"
|
2013-09-19 13:54:39 +00:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
|
|
|
class nsIThread;
|
1999-07-23 05:15:58 +00:00
|
|
|
|
2000-06-04 07:13:40 +00:00
|
|
|
class nsSound : public nsISound,
|
|
|
|
public nsIStreamLoaderObserver
|
1999-07-23 05:15:58 +00:00
|
|
|
|
2000-06-04 07:13:40 +00:00
|
|
|
{
|
|
|
|
public:
|
1999-07-23 05:15:58 +00:00
|
|
|
nsSound();
|
|
|
|
virtual ~nsSound();
|
2011-09-04 18:40:15 +00:00
|
|
|
void ShutdownOldPlayerThread();
|
2000-06-04 07:13:40 +00:00
|
|
|
|
1999-07-23 05:15:58 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
1999-08-21 08:54:47 +00:00
|
|
|
NS_DECL_NSISOUND
|
2000-06-04 07:13:40 +00:00
|
|
|
NS_DECL_NSISTREAMLOADEROBSERVER
|
2001-08-29 22:31:38 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void PurgeLastSound();
|
|
|
|
|
|
|
|
private:
|
2012-08-22 15:56:38 +00:00
|
|
|
uint8_t* mLastSound;
|
2009-07-07 01:47:08 +00:00
|
|
|
nsCOMPtr<nsIThread> mPlayerThread;
|
1999-07-23 05:15:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __nsSound_h__ */
|