renamed wxWave to wxSound

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2004-02-02 13:15:51 +00:00
parent d93966b92a
commit bae90c4cd5
3 changed files with 44 additions and 39 deletions

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wave.h
// Purpose: wxWave class (loads and plays short Windows .wav files).
// Name: sound.h
// Purpose: wxSound class (loads and plays short Windows .wav files).
// Optional on non-Windows platforms.
// Author: Stefan Csomor
// Modified by:
@ -10,33 +10,34 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WAVE_H_
#define _WX_WAVE_H_
#ifndef _WX_SOUND_H_
#define _WX_SOUND_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "wave.h"
#pragma interface "sound.h"
#endif
#if wxUSE_WAVE
#if wxUSE_SOUND
#include "wx/object.h"
class WXDLLEXPORT wxWave : public wxObject
class WXDLLEXPORT wxSound : public wxSoundBase
{
public:
wxWave();
wxWave(const wxString& fileName, bool isResource = FALSE);
wxWave(int size, const wxByte* data);
~wxWave();
wxSound();
wxSound(const wxString& fileName, bool isResource = FALSE);
wxSound(int size, const wxByte* data);
~wxSound();
public:
bool Create(const wxString& fileName, bool isResource = FALSE);
bool IsOk() const { return !m_sndname.IsEmpty(); }
bool Play(bool async = TRUE, bool looped = FALSE) const;
protected:
// prevent collision with some BSD definitions of macro Free()
bool FreeData();
bool DoPlay(unsigned flags) const;
private:
void* m_sndChan;
@ -49,4 +50,4 @@ private:
#endif
#endif
// _WX_WAVE_H_
// _WX_SOUND_H_

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wave.h
// Purpose: wxWave class
// Name: sound.h
// Purpose: wxSound class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
@ -9,43 +9,46 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WAVE_H_
#define _WX_WAVE_H_
#ifndef _WX_SOUND_H_
#define _WX_SOUND_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "wave.h"
#pragma interface "sound.h"
#endif
#if wxUSE_WAVE
#if wxUSE_SOUND
#include "wx/object.h"
class WXDLLIMPEXP_ADV wxWave : public wxObject
class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
{
public:
wxWave();
wxWave(const wxString& fileName, bool isResource = FALSE);
wxWave(int size, const wxByte* data);
~wxWave();
wxSound();
wxSound(const wxString& fileName, bool isResource = false);
wxSound(int size, const wxByte* data);
~wxSound();
public:
// Create from resource or file
bool Create(const wxString& fileName, bool isResource = FALSE);
bool Create(const wxString& fileName, bool isResource = false);
// Create from data
bool Create(int size, const wxByte* data);
bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
bool Play(bool async = TRUE, bool looped = FALSE) const;
bool IsOk() const { return (m_waveData ? true : false); };
static void Stop();
protected:
bool Free();
bool DoPlay(unsigned flags) const;
private:
wxByte* m_waveData;
int m_waveLength;
bool m_isResource;
DECLARE_NO_COPY_CLASS(wxWave)
DECLARE_NO_COPY_CLASS(wxSound)
};
#endif
#endif

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wave.h
// Purpose: wxWave class (loads and plays short Windows .wav files).
// Name: sound.h
// Purpose: wxSound class (loads and plays short Windows .wav files).
// Optional on non-Windows platforms.
// Author: David Webster
// Modified by:
@ -10,18 +10,18 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WAVE_H_
#define _WX_WAVE_H_
#ifndef _WX_SOUND_H_
#define _WX_SOUND_H_
#include "wx/object.h"
class wxWave : public wxObject
class wxSound : public wxSoundBase
{
public:
wxWave();
wxWave(const wxString& fileName, bool isResource = FALSE);
wxWave(int size, const wxByte* data);
~wxWave();
wxSound();
wxSound(const wxString& fileName, bool isResource = FALSE);
wxSound(int size, const wxByte* data);
~wxSound();
public:
// Create from resource or file
@ -30,10 +30,11 @@ public:
bool Create(int size, const wxByte* data);
bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
bool Play(bool async = TRUE, bool looped = FALSE) const;
protected:
bool Free();
bool DoPlay(unsigned flags) const;
private:
wxByte* m_waveData;
@ -42,4 +43,4 @@ private:
};
#endif
// _WX_WAVE_H_
// _WX_SOUND_H_